Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LTO - DQM] Compiler warnings -Wodr and -Wstrict-overflow in dqm category #38679

Closed
aandvalenzuela opened this issue Jul 11, 2022 · 10 comments
Closed

Comments

@aandvalenzuela
Copy link
Contributor

Hello,

We have seen some compiler warnings of the type -Wodr and -Wstrict-overflow in LTO_X IBs (CMSSW_12_5_LTO_X_2022-07-07-1100 and CMSSW_12_5_LTO_X_2022-07-06-1100, for example) in some packages of the dqm category. See sample stack trace:

  • DQM/HLTEvF reports -Wodr warning:
>> Building edm plugin tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/libDQMHLTEvFPlugins.so
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/gcc/10.3.0-84898dea653199466402e67d73657f10/bin/c++ -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++1z -ftree-vectorize -Wstrict-overflow -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -msse3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -shared -Wl,-E -Wl,-z,defs tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/DQMCorrelationClient.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/DaqTestHistograms.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/FourVectorHLT.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/HLTObjectMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/HLTObjectMonitorProtonLead.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/HLTObjectsMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/LumiMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/PSMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/PSMonitorClient.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/TrigObjTnPHistColl.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/TrigObjTnPSource.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/TriggerBxMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/TriggerBxVsOrbitMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/TriggerRatesMonitor.cc.o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/TriggerRatesMonitorClient.cc.o -o tmp/el8_amd64_gcc10/src/DQM/HLTEvF/plugins/DQMHLTEvFPlugins/libDQMHLTEvFPlugins.so -Wl,-E -Wl,--hash-style=gnu -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/biglib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/lib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/external/el8_amd64_gcc10/lib -L/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/cuda/11.5.2-c927b7e765e06433950d8a7eab9eddb4/lib64/stubs -lHLTriggerJetMET -lRecoMETMETAlgorithms -lRecoMuonTrackingTools -lRecoVertexKalmanVertexFit -lRecoVertexLinearizationPointFinders -lDQMOfflineTrigger -lRecoVertexVertexTools -lCommonToolsTriggerUtils -lRecoVertexVertexPrimitives -lTrackingToolsTrackRefitter -lHLTriggerHLTcore -lRecoEgammaEgammaIsolationAlgos -lRecoJetsJetProducers -lTrackingToolsTransientTrack -lCondFormatsHLTObjects -lDataFormatsPatCandidates -lDataFormatsHLTReco -lJetMETCorrectionsModules -lRecoJetsJetAlgorithms -lDataFormatsBTauReco -lDataFormatsJetMatching -lDataFormatsL1TParticleFlow -lDataFormatsMETReco -lDataFormatsTauReco -lJetMETCorrectionsJetCorrector -lJetMETCorrectionsObjects -lTrackingToolsKalmanUpdators -lTrackingToolsTrackFitters -lDataFormatsJetReco -lRecoMuonNavigation -lRecoTrackerTransientTrackingRecHit -lTrackingToolsGsfTools -lTrackingToolsRecoGeometry -lDataFormatsParticleFlowCandidate -lRecoEcalEgammaCoreTools -lRecoLocalTrackerSiStripRecHitConverter -lRecoMuonTransientTrackingRecHit -lRecoParticleFlowPFClusterTools -lRecoTrackerTkDetLayers -lTrackingToolsPatternTools -lDataFormatsParticleFlowReco -lRecoMTDDetLayers -lRecoMuonDetLayers -lTrackingToolsTrackAssociator -lTrackingToolsTransientTrackingRecHit -lDataFormatsEgammaCandidates -lDataFormatsHcalIsolatedTrack -lDataFormatsL1TCorrelator -lDataFormatsL1TMuonPhase2 -lDataFormatsMuonReco -lRecoLocalTrackerPhase2TrackerRecHits -lTrackPropagationSteppingHelixPropagator -lTrackingToolsDetLayers -lDataFormatsL1TMuon -lDataFormatsRecoCandidate -lRecoLocalTrackerClusterParameterEstimator -lTrackingToolsGeomPropagators -lDataFormatsCSCDigi -lDataFormatsEgammaReco -lDataFormatsGsfTrackReco -lDataFormatsVertexReco -lRecoLocalCaloHcalRecAlgos -lSimDataFormatsTrackingAnalysis -lTrackingToolsTrajectoryState -lCalibCalorimetryHcalAlgos -lDataFormatsGEMDigi -lDataFormatsTrackReco -lRecoTrackerRecord -lCalibFormatsHcalObjects -lDataFormatsGEMRecHit -lDataFormatsTrackCandidate -lDataFormatsTrackerRecHit2D -lL1TriggerL1TGlobal -lTrackingToolsRecords -lCondFormatsHcalObjects -lCondFormatsSiPhase2TrackerObjects -lDataFormatsCSCRecHit -lDataFormatsDTRecHit -lDataFormatsFTLRecHit -lDataFormatsL1TGlobal -lDataFormatsTrajectorySeed -lGeometryHcalTowerAlgo -lGeometryMTDGeometryBuilder -lL1TriggerGlobalTriggerAnalyzer -lRecoLocalTrackerRecords -lCalibFormatsSiStripObjects -lCalibTrackerRecords -lDataFormatsL1Trigger -lDataFormatsTrackingRecHit -lGeometryCSCGeometry -lGeometryCaloTopology -lGeometryDTGeometry -lGeometryEcalAlgo -lGeometryGEMGeometry -lGeometryMTDNumberingBuilder -lGeometryRPCGeometry -lGeometryTrackerGeometryBuilder -lCalibCalorimetryEcalLaserCorrection -lCommonToolsMVAUtils -lCondFormatsSiStripObjects -lDataFormatsL1TrackTrigger -lGeometryEcalCommonData -lGeometryHcalCommonData -lMagneticFieldRecords -lMagneticFieldVolumeBasedEngine -lRecoLocalCaloEcalRecAlgos -lRecoMuonRecords -lCondFormatsDataRecord -lDataFormatsCastorReco -lDataFormatsTrackerCommon -lDetectorDescriptionRegressionTest -lGeometryCaloGeometry -lGeometryCommonTopologies -lMagneticFieldLayers -lRecoMTDRecords -lCondCoreDBOutputService -lCondFormatsAlignment -lCondFormatsEcalObjects -lCondFormatsL1TObjects -lDataFormatsBeamSpot -lDataFormatsCaloTowers -lDataFormatsEcalRecHit -lDataFormatsGeometryCommonDetAlgo -lDataFormatsHcalRecHit -lDataFormatsHeavyIonEvent -lDataFormatsHepMCCandidate -lDataFormatsSiStripCluster -lDetectorDescriptionParser -lGeometryHGCalCommonData -lGeometryRecords -lGeometryTrackerNumberingBuilder -lMagneticFieldVolumeGeometry -lTrackingToolsAnalyticalJacobians -lCommonToolsStatistics -lCommonToolsUtilAlgos -lCondCoreCondDB -lCondFormatsAlignmentRecord -lCondFormatsESObjects -lCondFormatsJetMETObjects -lDQMServicesCore -lDataFormatsCandidate -lDataFormatsDTDigi -lDataFormatsEcalDigi -lDataFormatsGeometrySurface -lDataFormatsHcalDigi -lDataFormatsL1GlobalCaloTrigger -lDataFormatsSiStripCommon -lDataFormatsTrajectoryState -lDetectorDescriptionCore -lDetectorDescriptionDDCMS -lGeometryMTDCommonData -lHeterogeneousCoreCUDACore -lMagneticFieldEngine -lPhysicsToolsTensorFlow -lCalibFormatsCaloObjects -lCommonToolsUtils -lCondFormatsGeometryObjects -lDataFormatsCLHEP -lDataFormatsCaloRecHit -lDataFormatsEcalDetId -lDataFormatsForwardDetId -lDataFormatsGeometryVector -lDataFormatsHcalDetId -lDataFormatsL1CaloTrigger -lDataFormatsL1GlobalTrigger -lDataFormatsMuonDetId -lDataFormatsPhase2TrackerCluster -lDataFormatsSiPixelDetId -lDataFormatsSiStripDetId -lFWCoreFramework -lFWCorePrescaleService -lHeterogeneousCoreCUDAServices -lSimDataFormatsCaloHit -lSimDataFormatsTrack -lSimDataFormatsVertex -lCUDADataFormatsCommon -lCondFormatsCommon -lDataFormatsDetId -lDataFormatsFEDRawData -lDataFormatsL1GlobalMuonTrigger -lDataFormatsMath -lDataFormatsOnlineMetaData -lDataFormatsPhase2TrackerDigi -lDataFormatsScalers -lDataFormatsScouting -lDataFormatsSiPixelCluster -lDataFormatsSiStripDigi -lFWCoreCommon -lFWCoreServiceRegistry -lSimDataFormatsGeneratorProducts -lCalibCalorimetryEcalLaserAnalyzer -lCondFormatsPhysicsToolsObjects -lDataFormatsCommon -lFWCoreParameterSet -lHeterogeneousCoreCUDAUtilities -lFWCoreMessageLogger -lDataFormatsProvenance -lCondFormatsGBRForest -lFWCorePluginManager -lFWCoreReflection -lTrackingToolsTrajectoryParametrization -lCondFormatsSerialization -lFWCoreConcurrency -lFWCoreUtilities -lFWCoreVersion -lSimDataFormatsEncodedEventId -lUtilitiesBinningTools -lUtilitiesOpenSSL -lUtilitiesXerces -llcg_CoralCommon -llcg_RelationalAccess -llcg_CoralKernel -llcg_CoralBase -lDDAlign -lDDCond -lTMVA -lDDCore -lDDParsers -lMLP -lTreePlayer -lGraf3d -lPostscript -lMinuit -lMinuit2 -lGpad -lGraf -lPhysics -lHist -lMatrix -lGenVector -lMathMore -lTree -lNet -lGeom -lThread -lboost_filesystem -lMathCore -lRIO -lSmatrix -lboost_iostreams -lboost_regex -lboost_serialization -lboost_system -lclasslib -lCore -ltensorflow_cc -lboost_thread -lboost_date_time -lCLHEP -lHepMCfio -lHepMC -lpng -lpcre -ltensorflow_framework -lbz2 -lcudart -lcudadevrt -lnvToolsExt -lnvidia-ml -lcurl -lfastjetplugins -lfastjettools -lsiscone -lsiscone_spherical -lfastjet -lgif -lgsl -lKtEvent -ljpeg -lturbojpeg -luuid -lprotobuf -lsqlite3 -ltbb -lxerces-c -llzma -lz -lcuda -lfastjetcontribfragile -lfmt -lHepMC3 -lHepMC3search -lcms-md5 -lopenblas -lssl -lcrypto -lcrypt -ldl -lrt -lstdc++fs -ltinyxml2
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/DQM/HLTEvF/plugins/DQMCorrelationClient.h:17:8: warning: type 'struct MEPSet' violates the C++ One Definition Rule [-Wodr]
    17 | struct MEPSet {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/DQM/HLTEvF/plugins/PSMonitorClient.cc:23:8: note: a different type is defined in another translation unit
   23 | struct MEPSet {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/DQM/HLTEvF/plugins/DQMCorrelationClient.h:20:8: note: the first difference of corresponding definitions is field 'profileX'
   20 |   bool profileX;
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/DQM/HLTEvF/plugins/PSMonitorClient.cc:23:8: note: a type with different number of fields is defined in another translation unit
   23 | struct MEPSet {
      |        ^
Leaving library rule at src/DQM/HLTEvF/plugins
  • Validation/MtdValidation reports -Wodr warning:
>> Building edm plugin tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/libValidationMtdValidationAuto.so
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/gcc/10.3.0-84898dea653199466402e67d73657f10/bin/c++ -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++1z -ftree-vectorize -Wstrict-overflow -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -msse3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -shared -Wl,-E -Wl,-z,defs tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/BtlDigiHitsValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/BtlLocalRecoHarvester.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/BtlLocalRecoValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/BtlSimHitsHarvester.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/BtlSimHitsValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/EtlDigiHitsValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/EtlLocalRecoValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/EtlSimHitsValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/MtdTracksHarvester.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/MtdTracksValidation.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/Primary4DVertexHarvester.cc.o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/Primary4DVertexValidation.cc.o -o tmp/el8_amd64_gcc10/src/Validation/MtdValidation/plugins/ValidationMtdValidationAuto/libValidationMtdValidationAuto.so -Wl,-E -Wl,--hash-style=gnu -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/biglib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/lib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/external/el8_amd64_gcc10/lib -lRecoVertexPrimaryVertexProducer -lRecoVertexAdaptiveVertexFit -lRecoVertexKalmanVertexFit -lRecoVertexLinearizationPointFinders -lRecoVertexVertexTools -lRecoVertexVertexPrimitives -lTrackingToolsTransientTrack -lDataFormatsPatCandidates -lDataFormatsHLTReco -lDataFormatsBTauReco -lDataFormatsJetMatching -lDataFormatsL1TParticleFlow -lDataFormatsMETReco -lDataFormatsTauReco -lDataFormatsJetReco -lSimTrackerVertexAssociation -lTrackingToolsGsfTools -lDataFormatsParticleFlowCandidate -lSimDataFormatsAssociations -lTrackingToolsPatternTools -lDataFormatsParticleFlowReco -lTrackingToolsTransientTrackingRecHit -lDataFormatsEgammaCandidates -lDataFormatsHcalIsolatedTrack -lDataFormatsL1TCorrelator -lDataFormatsL1TMuonPhase2 -lDataFormatsMuonReco -lTrackingToolsDetLayers -lDataFormatsL1TMuon -lDataFormatsRecoCandidate -lSimTrackerCommon -lTrackingToolsGeomPropagators -lDataFormatsCSCDigi -lDataFormatsEgammaReco -lDataFormatsGsfTrackReco -lDataFormatsHGCalReco -lDataFormatsVertexReco -lSimDataFormatsTrackingAnalysis -lTrackingToolsTrajectoryState -lDataFormatsGEMDigi -lDataFormatsTrackReco -lDataFormatsGEMRecHit -lDataFormatsTrackCandidate -lDataFormatsTrackerRecHit2D -lTrackingToolsRecords -lDataFormatsCSCRecHit -lDataFormatsDTRecHit -lDataFormatsFTLRecHit -lDataFormatsTrajectorySeed -lGeometryMTDGeometryBuilder -lRecoLocalTrackerRecords -lCalibTrackerRecords -lDataFormatsL1Trigger -lDataFormatsTrackingRecHit -lGeometryMTDNumberingBuilder -lDataFormatsL1TrackTrigger -lMagneticFieldRecords -lCondFormatsDataRecord -lDataFormatsTrackerCommon -lGeometryCaloGeometry -lGeometryCommonTopologies -lSimDataFormatsCaloAnalysis -lCondFormatsAlignment -lDataFormatsBeamSpot -lDataFormatsCaloTowers -lDataFormatsEcalRecHit -lDataFormatsGeometryCommonDetAlgo -lDataFormatsHcalRecHit -lDataFormatsHepMCCandidate -lDataFormatsSiStripCluster -lGeometryRecords -lGeometryTrackerNumberingBuilder -lSimDataFormatsCrossingFrame -lTrackingToolsAnalyticalJacobians -lCommonToolsStatistics -lCondFormatsAlignmentRecord -lDQMServicesCore -lDataFormatsCandidate -lDataFormatsDTDigi -lDataFormatsEcalDigi -lDataFormatsGeometrySurface -lDataFormatsHcalDigi -lDataFormatsL1GlobalCaloTrigger -lDataFormatsTrajectoryState -lDetectorDescriptionCore -lDetectorDescriptionDDCMS -lGeometryMTDCommonData -lMagneticFieldEngine -lSimDataFormatsTrackingHit -lSimGeneralHepPDTRecord -lCondFormatsGeometryObjects -lDataFormatsCLHEP -lDataFormatsCaloRecHit -lDataFormatsEcalDetId -lDataFormatsForwardDetId -lDataFormatsGeometryVector -lDataFormatsHcalDetId -lDataFormatsL1CaloTrigger -lDataFormatsL1GlobalTrigger -lDataFormatsMuonDetId -lDataFormatsPhase2TrackerCluster -lDataFormatsSiPixelDetId -lDataFormatsSiStripDetId -lFWCoreFramework -lSimDataFormatsCaloHit -lSimDataFormatsPileupSummaryInfo -lSimDataFormatsTrack -lSimDataFormatsVertex -lDataFormatsDetId -lDataFormatsFEDRawData -lDataFormatsL1GlobalMuonTrigger -lDataFormatsMath -lDataFormatsPhase2TrackerDigi -lDataFormatsScouting -lDataFormatsSiPixelCluster -lDataFormatsSiStripDigi -lFWCoreCommon -lFWCoreServiceRegistry -lSimDataFormatsGeneratorProducts -lDataFormatsCommon -lFWCoreParameterSet -lFWCoreMessageLogger -lDataFormatsProvenance -lFWCorePluginManager -lFWCoreReflection -lTrackingToolsTrajectoryParametrization -lCondFormatsSerialization -lFWCoreConcurrency -lFWCoreUtilities -lFWCoreVersion -lSimDataFormatsEncodedEventId -lDDAlign -lDDCond -lDDCore -lDDParsers -lPhysics -lHist -lMatrix -lGenVector -lMathMore -lTree -lNet -lGeom -lThread -lMathCore -lRIO -lSmatrix -lboost_regex -lboost_serialization -lclasslib -lCore -lboost_thread -lboost_date_time -lCLHEP -lHepMCfio -lHepMC -lpcre -lbz2 -lgsl -lHepPDT -lHepPID -luuid -lprotobuf -ltbb -lxerces-c -llzma -lz -lfmt -lHepMC3 -lHepMC3search -lcms-md5 -lopenblas -lcrypt -ldl -lrt -lstdc++fs -ltinyxml2
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/MtdValidation/plugins/BtlLocalRecoValidation.cc:45:8: warning: type 'struct MTDHit' violates the C++ One Definition Rule [-Wodr]
    45 | struct MTDHit {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/MtdValidation/plugins/BtlSimHitsValidation.cc:42:8: note: a different type is defined in another translation unit
   42 | struct MTDHit {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/MtdValidation/plugins/BtlLocalRecoValidation.cc:48:9: note: the first difference of corresponding definitions is field 'x_local'
   48 |   float x_local;
      |         ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/MtdValidation/plugins/BtlSimHitsValidation.cc:45:9: note: a field with different name is defined in another translation unit
   45 |   float x;
      |         ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/MtdValidation/plugins/BtlLocalRecoValidation.cc:45:8: note: type 'struct MTDHit' itself violates the C++ One Definition Rule
   45 | struct MTDHit {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/MtdValidation/plugins/BtlSimHitsValidation.cc:42:8: note: the incompatible type is defined here
   42 | struct MTDHit {
      |        ^
Leaving library rule at src/Validation/MtdValidation/plugins
  • Validation/Geometry reports -Wstrict-overflow warning:
>> Building edm plugin tmp/el8_amd64_gcc10/src/Validation/Geometry/plugins/ValidationGeometryPlugins/libValidationGeometryPlugins.so
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/gcc/10.3.0-84898dea653199466402e67d73657f10/bin/c++ -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++1z -ftree-vectorize -Wstrict-overflow -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -msse3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -ftls-model=global-dynamic -pthread -DG4GEOM_USE_USOLIDS -DBOOST_DISABLE_ASSERTS -flto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -shared -Wl,-E -Wl,-z,defs tmp/el8_amd64_gcc10/src/Validation/Geometry/plugins/ValidationGeometryPlugins/MaterialBudgetHcalAnalysis.cc.o tmp/el8_amd64_gcc10/src/Validation/Geometry/plugins/ValidationGeometryPlugins/MaterialBudgetHcalProducer.cc.o -o tmp/el8_amd64_gcc10/src/Validation/Geometry/plugins/ValidationGeometryPlugins/libValidationGeometryPlugins.so -Wl,-E -Wl,--hash-style=gnu -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/biglib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/lib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/external/el8_amd64_gcc10/lib -lGeometryRecords -lCommonToolsUtilAlgos -lCondFormatsAlignmentRecord -lDetectorDescriptionCore -lDetectorDescriptionDDCMS -lSimDataFormatsValidationFormats -lSimG4CoreNotification -lSimG4CoreWatcher -lCommonToolsUtils -lDataFormatsGeometryVector -lFWCoreFramework -lSimDataFormatsTrack -lSimDataFormatsVertex -lDataFormatsDetId -lDataFormatsMath -lFWCoreCommon -lFWCoreServiceRegistry -lSimDataFormatsForward -lDataFormatsCommon -lFWCoreParameterSet -lFWCoreMessageLogger -lDataFormatsProvenance -lFWCorePluginManager -lFWCoreReflection -lFWCoreConcurrency -lFWCoreUtilities -lFWCoreVersion -lSimDataFormatsEncodedEventId -lDDAlign -lDDCond -lDDCore -lDDParsers -lPhysics -lHist -lMatrix -lGenVector -lMathMore -lTree -lNet -lGeom -lThread -lG4digits_hits -lG4error_propagation -lG4event -lG4geometry -lG4global -lG4graphics_reps -lG4intercoms -lG4interfaces -lG4materials -lG4parmodels -lG4particles -lG4persistency -lG4physicslists -lG4processes -lG4readout -lG4run -lG4tracking -lG4track -lG4analysis -lMathCore -lRIO -lboost_regex -lCore -lboost_thread -lboost_date_time -lCLHEP -lHepMCfio -lHepMC -lpcre -lvecgeom -lbz2 -lexpat -lgsl -luuid -ltbb -lxerces-c -llzma -lz -lfmt -lcms-md5 -lopenblas -lcrypt -ldl -lrt -lstdc++fs -ltinyxml2
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/Geometry/plugins/MaterialBudgetHcalProducer.cc: In member function 'update':
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/2604283bf44a2288b36325ed38662fdd/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-09-1100/src/Validation/Geometry/plugins/MaterialBudgetHcalProducer.cc:342:11: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
   342 |           if (lay != layer_)
      |           ^
Leaving library rule at src/Validation/Geometry/plugins

These warnings are present also in other packages, such as reported in #38650 (It seems there are some elements defined multiple times within the same namespace leading to violation of the C++ One Definition Rule) and #38649 (Signed overflow could occur under certain conditions). Could you please have a look at it?

Many thanks,
Andrea.

@cmsbuild
Copy link
Contributor

A new Issue was created by @aandvalenzuela Andrea Valenzuela.

@Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@aandvalenzuela
Copy link
Contributor Author

assign dqm

@cmsbuild
Copy link
Contributor

New categories assigned: dqm

@jfernan2,@ahmad3213,@micsucmed,@rvenditti,@emanueleusai,@pmandrik you have been requested to review this Pull request/Issue and eventually sign? Thanks

@aandvalenzuela
Copy link
Contributor Author

As pointed out in #38685, the -Wstrict-overflow warning is also appearing in BigProducts/Simulation in the same files as for Validation/Geometry:

>> Building  big plugin tmp/el8_amd64_gcc10/src/BigProducts/Simulation/pluginSimulation.so
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/gcc/10.3.0-84898dea653199466402e67d73657f10/bin/c++ -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++1z -ftree-vectorize -Wstrict-overflow -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -msse3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -ftls-model=global-dynamic -pthread -DG4GEOM_USE_USOLIDS -DBOOST_DISABLE_ASSERTS -flto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -Wl,--exclude-libs,ALL -shared -Wl,-E -Wl,-z,defs objs/el8_amd64_gcc10/SimG4CMSCalo.obj objs/el8_amd64_gcc10/SimG4CMSCaloPlugins.obj objs/el8_amd64_gcc10/SimG4CMSCherenkovAnalysis.obj objs/el8_amd64_gcc10/SimG4CMSCherenkovAnalysisPlugins.obj objs/el8_amd64_gcc10/SimG4CMSEcalTestBeam.obj objs/el8_amd64_gcc10/SimG4CMSEcalTestBeamAuto.obj objs/el8_amd64_gcc10/SimG4CMSFP420.obj objs/el8_amd64_gcc10/SimG4CMSFP420Plugins.obj objs/el8_amd64_gcc10/SimG4CMSForward.obj objs/el8_amd64_gcc10/SimG4CMSForwardPlugins.obj objs/el8_amd64_gcc10/SimG4CMSHGCalTestBeam.obj objs/el8_amd64_gcc10/SimG4CMSTestBeamPlugins.obj objs/el8_amd64_gcc10/SimG4CMSHcalTestBeam.obj objs/el8_amd64_gcc10/SimG4CMSHcalTestBeamPlugins.obj objs/el8_amd64_gcc10/SimG4CMSMuon.obj objs/el8_amd64_gcc10/SimG4CMSMuonPlugins.obj objs/el8_amd64_gcc10/SimG4CMSPPS.obj objs/el8_amd64_gcc10/SimG4CMSPPSPlugins.obj objs/el8_amd64_gcc10/SimG4CMSShowerLibraryProducer.obj objs/el8_amd64_gcc10/SimG4CMSHcalForwardLibWriter.obj objs/el8_amd64_gcc10/SimG4CMSShowerLibraryProducerPlugins.obj objs/el8_amd64_gcc10/SimG4CMSTracker.obj objs/el8_amd64_gcc10/SimG4CMSTrackerPlugins.obj objs/el8_amd64_gcc10/SimG4CoreApplication.obj objs/el8_amd64_gcc10/SimG4CoreApplicationPlugins.obj objs/el8_amd64_gcc10/SimG4CoreCustomPhysics.obj objs/el8_amd64_gcc10/SimG4CoreCustomPhysicsPlugins.obj objs/el8_amd64_gcc10/SimG4CoreDD4hepGeometry.obj objs/el8_amd64_gcc10/SimG4CoreGFlash.obj objs/el8_amd64_gcc10/SimG4CoreGFlashPlugins.obj objs/el8_amd64_gcc10/SimG4CoreGenerators.obj objs/el8_amd64_gcc10/SimG4CoreGeometry.obj objs/el8_amd64_gcc10/SimG4CoreHelpfulWatchers.obj objs/el8_amd64_gcc10/SimG4CoreMagneticField.obj objs/el8_amd64_gcc10/SimG4CoreNotification.obj objs/el8_amd64_gcc10/SimG4CorePhysics.obj objs/el8_amd64_gcc10/SimG4CorePhysicsLists.obj objs/el8_amd64_gcc10/SimG4CorePhysicsListsPlugins.obj objs/el8_amd64_gcc10/SimG4CorePrintGeomInfoPlugins.obj objs/el8_amd64_gcc10/SimG4CoreSaveSimTrackAction.obj objs/el8_amd64_gcc10/SimG4CoreSensitiveDetector.obj objs/el8_amd64_gcc10/SimG4CoreTrackingVerbose.obj objs/el8_amd64_gcc10/DD4hep_SimTrackerMaterialAnalysisPlugins.obj objs/el8_amd64_gcc10/SimTrackerTrackerMaterialAnalysisPlugins.obj objs/el8_amd64_gcc10/ValidationCheckOverlap.obj objs/el8_amd64_gcc10/ValidationEcalHits.obj objs/el8_amd64_gcc10/ValidationGeometry.obj objs/el8_amd64_gcc10/ValidationGeometryPlugins.obj objs/el8_amd64_gcc10/ValidationHcalHits.obj objs/el8_amd64_gcc10/testValidationHcalHits.obj objs/el8_amd64_gcc10/ValidationHGCalValidation.obj objs/el8_amd64_gcc10/ValidationHGCalValidationAuto.obj -o tmp/el8_amd64_gcc10/src/BigProducts/Simulation/pluginSimulation.so -Wl,-E -Wl,--hash-style=gnu -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/biglib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/lib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/external/el8_amd64_gcc10/lib -L/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/cuda/11.5.2-c927b7e765e06433950d8a7eab9eddb4/lib64/stubs -lGeom -lRecoLocalCaloHGCalRecProducers -lDataFormatsParticleFlowCandidate -lRecoLocalCaloHGCalRecAlgos -lDataFormatsParticleFlowReco -lL1TriggerL1THGCal -lDataFormatsEgammaCandidates -lDataFormatsMuonReco -lGeometryHGCalGeometry -lDataFormatsRecoCandidate -lTrackingToolsGeomPropagators -lDataFormatsEgammaReco -lDataFormatsGsfTrackReco -lDataFormatsVertexReco -lTrackingToolsTrajectoryState -lDataFormatsTrackReco -lDataFormatsGEMRecHit -lDataFormatsTrackCandidate -lDataFormatsTrackerRecHit2D -lCondFormatsHcalObjects -lDataFormatsCSCRecHit -lDataFormatsDTRecHit -lDataFormatsFTLRecHit -lDataFormatsL1THGCal -lDataFormatsTrajectorySeed -lGeometryHcalTowerAlgo -lDataFormatsL1Trigger -lDataFormatsTrackingRecHit -lGeometryCaloTopology -lGeometryEcalTestBeam -lGeometryTrackerGeometryBuilder -lDataFormatsL1TrackTrigger -lGeometryEcalCommonData -lGeometryHcalCommonData -lMagneticFieldRecords -lCondFormatsDataRecord -lDataFormatsTrackerCommon -lDetectorDescriptionRegressionTest -lGeometryCaloGeometry -lGeometryCommonTopologies -lSimDataFormatsCaloAnalysis -lCondFormatsAlignment -lDataFormatsBeamSpot -lDataFormatsCaloTowers -lDataFormatsEcalRecHit -lDataFormatsGeometryCommonDetAlgo -lDataFormatsHepMCCandidate -lDataFormatsSiStripCluster -lDetectorDescriptionParser -lGeometryHGCalCommonData -lGeometryHcalTestBeamData -lGeometryMuonNumbering -lGeometryRecords -lGeometryTrackerNumberingBuilder -lSimDataFormatsSimHitMaker -lTrackingToolsAnalyticalJacobians -lCommonToolsUtilAlgos -lCondFormatsAlignmentRecord -lDQMServicesCore -lDataFormatsCandidate -lDataFormatsDTDigi -lDataFormatsEcalDigi -lDataFormatsGeometrySurface -lDataFormatsHGCRecHit -lDataFormatsL1GlobalCaloTrigger -lDataFormatsTrajectoryState -lDetectorDescriptionCore -lDetectorDescriptionDDCMS -lGeometryMTDCommonData -lHeterogeneousCoreCUDACore -lMagneticFieldEngine -lPhysicsToolsTensorFlow -lSimDataFormatsCaloTest -lSimDataFormatsEcalTestBeam -lSimDataFormatsTrackingHit -lSimDataFormatsValidationFormats -lSimG4CoreWatcher -lSimGeneralHepPDTRecord -lTBDataFormatsEcalTBObjects -lCommonToolsUtils -lCondFormatsGeometryObjects -lDataFormatsCLHEP -lDataFormatsCTPPSDetId -lDataFormatsCaloRecHit -lDataFormatsEcalDetId -lDataFormatsForwardDetId -lDataFormatsGeometryVector -lDataFormatsHcalDetId -lDataFormatsL1CaloTrigger -lDataFormatsL1GlobalTrigger -lDataFormatsMuonDetId -lDataFormatsPhase2TrackerCluster -lDataFormatsSiPixelDetId -lDataFormatsSiStripDetId -lFWCoreFramework -lHeterogeneousCoreCUDAServices -lSimDataFormatsCaloHit -lSimDataFormatsTrack -lSimDataFormatsVertex -lCUDADataFormatsCommon -lDataFormatsDetId -lDataFormatsFEDRawData -lDataFormatsL1GlobalMuonTrigger -lDataFormatsMath -lDataFormatsPhase2TrackerDigi -lDataFormatsScouting -lDataFormatsSiPixelCluster -lDataFormatsSiStripDigi -lFWCoreCommon -lFWCoreServiceRegistry -lSimDataFormatsForward -lSimDataFormatsGeneratorProducts -lSimDataFormatsHcalTestBeam -lSimGeneralGFlash -lDataFormatsCommon -lFWCoreParameterSet -lHeterogeneousCoreCUDAUtilities -lFWCoreMessageLogger -lDataFormatsProvenance -lFWCorePluginManager -lFWCoreReflection -lTrackingToolsTrajectoryParametrization -lCondFormatsSerialization -lFWCoreConcurrency -lFWCoreUtilities -lFWCoreVersion -lSimDataFormatsEncodedEventId -lUtilitiesXerces -lDDAlign -lDDCond -lDDG4-static -lDDCore -lDDParsers -lMinuit -lGpad -lGraf -lPhysics -lHist -lMatrix -lGenVector -lMathMore -lTree -lNet -lThread -lgeant4-static -lMathCore -lRIO -lSmatrix -lboost_regex -lboost_serialization -lclasslib -lCore -ltensorflow_cc -lboost_thread -lboost_date_time -lCLHEP -lHepMCfio -lHepMC -lpng -lpcre -ltensorflow_framework -lvecgeom -lbz2 -lcudart -lcudadevrt -lnvToolsExt -lnvidia-ml -lexpat -lgif -lgsl -lHepPDT -lHepPID -ljpeg -lturbojpeg -luuid -lprotobuf -lsqlite3 -ltbb -lxerces-c -llzma -lz -lcuda -lfmt -lHepMC3 -lHepMC3search -lcms-md5 -lopenblas -lcrypt -ldl -lrt -lstdc++fs -ltinyxml2
lto-wrapper: warning: Extra option to -Xassembler: --compress-debug-sections, dropping all -Xassembler and -Wa options.
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/src/Validation/Geometry/src/MaterialBudgetHcalHistos.cc: In member function 'fillPerStep':
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/src/Validation/Geometry/src/MaterialBudgetHcalHistos.cc:265:13: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
   265 |             if (lay != layer_)
      |             ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/src/Validation/Geometry/plugins/MaterialBudgetHcalProducer.cc: In member function 'update':
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/9802c30fc48bdc09db9c7193cb951860/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-07-2300/src/Validation/Geometry/plugins/MaterialBudgetHcalProducer.cc:342:11: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
   342 |           if (lay != layer_)
      |  

@makortel
Copy link
Contributor

@smuzaffar While trying to understand some of these -Wstrict-overflow warnings I came across

-fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer and signed integer overflow is now undefined by default at all optimization levels. Using -fsanitize=signed-integer-overflow is now the preferred way to audit code, -Wstrict-overflow is deprecated.

from GCC 8 release notes (pointed in https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=1635615)

We already include signed-integer-overflow as part of UBSAN, don't we? Should we consider dropping -Wstrict-overflow?

@smuzaffar
Copy link
Contributor

smuzaffar commented Aug 17, 2022

good point @makortel . For now, we are not passing -fsanitize=signed-integer-overflow for UBSAN IBs ( these are the flags we set for various sanitizer IBs) . I have no objections on adding -fsanitize=signed-integer-overflow for UBSAN and dropping -Wstrict-overflow from default flags

@makortel
Copy link
Contributor

For now, we are not passing -fsanitize=signed-integer-overflow for UBSAN IBs ( these are the flags we set for various sanitizer IBs)

Ok, but we see warnings from signed integer overflow like

136.809/step3:DataFormats/Math/interface/approx_exp.h:162:32: runtime error: signed integer overflow: 2147483647 + 127 cannot be represented in type 'int'

(from https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_12_5_X_2022-08-15-1100/logs/2e/2eda787bcea13dfe71170530fda56e1d/log)

I found from Clang's manual that -fsanitize=undefined apparently includes the signed-integer-overflow

-fsanitize=undefined: All of the checks listed above other than float-divide-by-zero, unsigned-integer-overflow, implicit-conversion, local-bounds and the nullability-* group of checks.

(GCC's manual is not v, but they refer to the Clang's manual of the sanitizer)

@smuzaffar
Copy link
Contributor

ok, so lets drop -Wstrict-overflow as it is deprecated. I have opened cms-sw/cmsdist#8026

@smuzaffar
Copy link
Contributor

full cmssw PR tests with out -Wstrict-overflow look good.

if no objections then I can merge cms-sw/cmsdist#8026 to drop -Wstrict-overflow

@smuzaffar
Copy link
Contributor

closing as cms-sw/cmsdist#8026 has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants