cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.08k stars 4.31k forks source link

l1t::CorrThreeBodyCondition::evaluateCondition makes use of uninitialized ```corrPar.chargeCorrelation``` #44968

Open VinInn opened 5 months ago

VinInn commented 5 months ago

while debugging #44957 I found this one as well (once recompiling with -g to get line numbers)

==993133== Conditional jump or move depends on uninitialised value(s)
==993133==    at 0x8FA7930B: l1t::CorrThreeBodyCondition::evaluateCondition(int) const (CorrThreeBodyCondition.cc:479)
==993133==    by 0x8FA8ACAE: UnknownInlinedFun (ConditionEvaluation.h:66)
==993133==    by 0x8FA8ACAE: l1t::GlobalBoard::runGTL(edm::Event const&, edm::EventSetup const&, TriggerMenu const*, bool, int, std::unique_ptr<GlobalObjectMapRecord, std::default_delete<GlobalObjectMapRecord> >&, unsigned int, int, int, int, int, int) (GlobalBoard.cc:792)
==993133==    by 0x8F9AC4FF: L1TGlobalProducer::produce(edm::Event&, edm::EventSetup const&) (L1TGlobalProducer.cc:635)
==993133==    by 0x4AA65C2: edm::stream::EDProducerAdaptorBase::doEvent(edm::EventTransitionInfo const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4A853EB: edm::WorkerT<edm::stream::EDProducerAdaptorBase>::implDo(edm::EventTransitionInfo const&, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4A11528: std::__exception_ptr::exception_ptr edm::Worker::runModuleAfterAsyncPrefetch<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(std::__exception_ptr::exception_ptr, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::TransitionInfoType const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4A1B997: edm::Worker::RunModuleTask<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >::execute() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4E74F27: tbb::detail::d1::function_task<edm::WaitingTaskList::announce()::{lambda()#1}>::execute(tbb::detail::d1::execution_data&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreConcurrency.so)
==993133==    by 0x640991A: UnknownInlinedFun (task_dispatcher.h:322)
==993133==    by 0x640991A: UnknownInlinedFun (task_dispatcher.h:458)
==993133==    by 0x640991A: UnknownInlinedFun (arena.cpp:137)
==993133==    by 0x640991A: tbb::detail::r1::market::process(rml::job&) (market.cpp:599)
==993133==    by 0x640BACD: UnknownInlinedFun (private_server.cpp:271)
==993133==    by 0x640BACD: tbb::detail::r1::rml::private_worker::thread_routine(void*) (private_server.cpp:221)
==993133==    by 0x68C6801: start_thread (in /usr/lib64/libc.so.6)
==993133==  Uninitialised value was created by a stack allocation
==993133==    at 0x8F9D3B47: l1t::TriggerMenuParser::parseCorrelationThreeBody(L1TUtmCondition, unsigned int) (TriggerMenuParser.cc:3218)
==993133==
==993133== Conditional jump or move depends on uninitialised value(s)
==993133==    at 0x8FA78E17: l1t::CorrThreeBodyCondition::evaluateCondition(int) const (CorrThreeBodyCondition.cc:483)
==993133==    by 0x8FA8ACAE: UnknownInlinedFun (ConditionEvaluation.h:66)
==993133==    by 0x8FA8ACAE: l1t::GlobalBoard::runGTL(edm::Event const&, edm::EventSetup const&, TriggerMenu const*, bool, int, std::unique_ptr<GlobalObjectMapRecord, std::default_delete<GlobalObjectMapRecord> >&, unsigned int, int, int, int, int, int) (GlobalBoard.cc:792)
==993133==    by 0x8F9AC4FF: L1TGlobalProducer::produce(edm::Event&, edm::EventSetup const&) (L1TGlobalProducer.cc:635)
==993133==    by 0x4AA65C2: edm::stream::EDProducerAdaptorBase::doEvent(edm::EventTransitionInfo const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4A853EB: edm::WorkerT<edm::stream::EDProducerAdaptorBase>::implDo(edm::EventTransitionInfo const&, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4A11528: std::__exception_ptr::exception_ptr edm::Worker::runModuleAfterAsyncPrefetch<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(std::__exception_ptr::exception_ptr, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::TransitionInfoType const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4A1B997: edm::Worker::RunModuleTask<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >::execute() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreFramework.so)
==993133==    by 0x4E74F27: tbb::detail::d1::function_task<edm::WaitingTaskList::announce()::{lambda()#1}>::execute(tbb::detail::d1::execution_data&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/libFWCoreConcurrency.so)
==993133==    by 0x640991A: UnknownInlinedFun (task_dispatcher.h:322)
==993133==    by 0x640991A: UnknownInlinedFun (task_dispatcher.h:458)
==993133==    by 0x640991A: UnknownInlinedFun (arena.cpp:137)
==993133==    by 0x640991A: tbb::detail::r1::market::process(rml::job&) (market.cpp:599)
==993133==    by 0x640BACD: UnknownInlinedFun (private_server.cpp:271)
==993133==    by 0x640BACD: tbb::detail::r1::rml::private_worker::thread_routine(void*) (private_server.cpp:221)
==993133==    by 0x68C6801: start_thread (in /usr/lib64/libc.so.6)
==993133==  Uninitialised value was created by a stack allocation
==993133==    at 0x8F9D3B47: l1t::TriggerMenuParser::parseCorrelationThreeBody(L1TUtmCondition, unsigned int) (TriggerMenuParser.cc:3218)

which seems to point to an access to a uninitialized corrPar.chargeCorrelation

cmsbuild commented 5 months ago

cms-bot internal usage

cmsbuild commented 5 months ago

A new Issue was created by @VinInn.

@rappoccio, @smuzaffar, @makortel, @sextonkennedy, @antoniovilela, @Dr15Jones can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

makortel commented 5 months ago

assign l1

cmsbuild commented 5 months ago

New categories assigned: l1

@epalencia,@aloeliger you have been requested to review this Pull request/Issue and eventually sign? Thanks