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

[ASAN][heap-buffer-overflow] Geometry/CaloTopology/src/HcalTopology.cc #11979

Closed
davidlt opened this issue Oct 20, 2015 · 5 comments
Closed

[ASAN][heap-buffer-overflow] Geometry/CaloTopology/src/HcalTopology.cc #11979

davidlt opened this issue Oct 20, 2015 · 5 comments

Comments

@davidlt
Copy link
Contributor

davidlt commented Oct 20, 2015

slc6_amd64_gcc493 and CMSSW_7_6_X_2015-10-19-1100

std::pair<double,double> HcalTopology::etaRange(HcalSubdetector subdet,

Can be tested on 1.0 step2 1st event.

Begin processing the 1st record. Run 1, Event 1, LumiSection 1 at 20-Oct-2015 09:57:55.888 CEST
cmsRun: /mnt/build/davidlt/CMSSW_7_6_X_2015-10-19-2300/src/Geometry/CaloTopology/src/HcalTopology.cc:857: std::pair<double, double> HcalTopology::etaRange(HcalSubdetector, int) const: Assertion `ieta - 1 >= 0' failed.

Looks like negative index on container.

Asserts

diff --git a/Geometry/CaloTopology/src/HcalTopology.cc b/Geometry/CaloTopology/src/HcalTopology.cc
index de92534..428f923 100644
--- a/Geometry/CaloTopology/src/HcalTopology.cc
+++ b/Geometry/CaloTopology/src/HcalTopology.cc
@@ -844,11 +844,19 @@ std::pair<double,double> HcalTopology::etaRange(HcalSubdetector subdet,

   if (subdet == HcalForward) {
     unsigned int ii = (unsigned int)(ieta-firstHFRing_);
+    assert(ii < etaTableHF.size());
+    assert(ii + 1 < etaTableHF.size());
     return std::pair<double,double>(etaTableHF[ii],etaTableHF[ii+1]);
   } else {
     if (mode_==HcalTopologyMode::LHC && ieta == lastHERing_-1) {
+      assert(ieta - 1 >= 0);
+      assert(ieta - 1 < static_cast<long long>(etaTable.size()));
+      assert(ieta + 1 < static_cast<long long>(etaTable.size()));
       return std::pair<double,double>(etaTable[ieta-1],etaTable[ieta+1]);
     } else {
+      assert(ieta - 1 >= 0);
+      assert(ieta - 1 < static_cast<long long>(etaTable.size()));
+      assert(ieta < static_cast<long long>(etaTable.size()));
       return std::pair<double,double>(etaTable[ieta-1],etaTable[ieta]);
     }
   }

Report

=================================================================
==10226==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6110005c7ef8 at pc 0x7fd9b9b3aa23 bp 0x7fff6d6d0610 sp 0x7fff6d6d05f0
READ of size 8 at 0x6110005c7ef8 thread T0
   #0 0x7fd9b9b3aa22 in HcalTopology::etaRange(HcalSubdetector, int) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libGeometryCaloTopology.so+0x27a22)
   #1 0x7fd9b9c3bc57 in HcalTrigTowerGeometry::towerEtaBounds(int, double&, double&) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libGeometryHcalTowerAlgo.so+0x32c57)
   #2 0x7fd9b979376e in CaloTPGTranscoderULUT::loadHCALUncompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libCalibCalorimetryCaloTPG.so+0x976e)
   #3 0x7fd9b979451d in CaloTPGTranscoderULUT::loadHCALUncompress(std::string const&, HcalLutMetadata const&, HcalTrigTowerGeometry const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libCalibCalorimetryCaloTPG.so+0xa51d)
   #4 0x7fd9b9794ef7 in CaloTPGTranscoderULUT::setup(HcalLutMetadata const&, HcalTrigTowerGeometry const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libCalibCalorimetryCaloTPG.so+0xaef7)
   #5 0x7fd9b97aba92 in CaloTPGTranscoderULUTs::produce(CaloTPGRecord const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginCalibCalorimetryCaloTPGPlugins.so+0x10a92)
   #6 0x7fd9b97af81f in edm::eventsetup::CallbackProxy<edm::eventsetup::Callback<CaloTPGTranscoderULUTs, std::auto_ptr<CaloTPGTranscoder>, CaloTPGRecord, edm::eventsetup::CallbackSimpleDecorator<CaloTPGRecord> >, CaloTPGRecord, std::auto_ptr<CaloTPGTranscoder> >::getImpl(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginCalibCalorimetryCaloTPGPlugins.so+0x1481f)
   #7 0x7fd9d6caef8c in edm::eventsetup::DataProxy::get(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0xf8f8c)
   #8 0x7fd9d6d9c679 in edm::eventsetup::EventSetupRecord::getFromProxy(edm::eventsetup::DataKey const&, edm::eventsetup::ComponentDescription const*&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1e6679)
   #9 0x7fd9aaef7c34 in HcalTrigPrimDigiProducer::produce(edm::Event&, edm::EventSetup const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginSimCalorimetryHcalTrigPrimProducers.so+0x1ac34)
   #10 0x7fd9d6cce149 in edm::EDProducer::doEvent(edm::EventPrincipal&, edm::EventSetup const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x118149)
   #11 0x7fd9d6f437fd in edm::WorkerT<edm::EDProducer>::implDo(edm::EventPrincipal&, edm::EventSetup const&, edm::ModuleCallingContext const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x38d7fd)
   #12 0x7fd9d6d3dd2b in decltype ({parm#1}()) edm::convertException::wrap<bool edm::Worker::doWork<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*)::{lambda()#1}>(bool edm::Worker::doWork<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*)::{lambda()#1}) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x187d2b)
   #13 0x7fd9d6d3e49b in bool edm::Worker::doWork<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x18849b)
   #14 0x7fd9d6d4d067 in decltype ({parm#1}()) edm::convertException::wrap<void edm::Path::processOneOccurrence<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, edm::StreamID const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*)::{lambda()#1}>(void edm::Path::processOneOccurrence<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, edm::StreamID const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*)::{lambda()#1}) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x197067)
   #15 0x7fd9d6d4d6d0 in void edm::Path::processOneOccurrence<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, edm::StreamID const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1976d0)
   #16 0x7fd9d6d4df5b in void edm::StreamSchedule::processOneEvent<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, bool)::{lambda()#1}::operator()() const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x197f5b)
   #17 0x7fd9d6d4e6f1 in decltype ({parm#1}()) edm::convertException::wrap<void edm::StreamSchedule::processOneEvent<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, bool)::{lambda()#1}>(void edm::StreamSchedule::processOneEvent<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, bool)::{lambda()#1}) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1986f1)
   #18 0x7fd9d6d4ed34 in void edm::StreamSchedule::processOneEvent<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::MyPrincipal&, edm::EventSetup const&, bool) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x198d34)
   #19 0x7fd9d6d323f7 in edm::EventProcessor::processEvent(unsigned int) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x17c3f7)
   #20 0x7fd9d6d33970 in edm::EventProcessor::processEventsForStreamAsync(unsigned int, std::atomic<bool>*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x17d970)
   #21 0x7fd9d6d590c6 in edm::StreamProcessingTask::execute() (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1a30c6)
   #22 0x7fd9d4b9cbeb in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) ../../src/tbb/custom_scheduler.h:474
   #23 0x7fd9d6d33236 in edm::EventProcessor::readAndProcessEvent() (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x17d236)
   #24 0x7fd9d6cd258d in statemachine::HandleEvent::readAndProcessEvent() (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x11c58d)
   #25 0x7fd9d6cd871f in statemachine::HandleEvent::HandleEvent(boost::statechart::state<statemachine::HandleEvent, statemachine::HandleLumis, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::my_context) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x12271f)
   #26 0x7fd9d6cf3c9d in boost::statechart::state<statemachine::HandleEvent, statemachine::HandleLumis, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::deep_construct(boost::intrusive_ptr<statemachine::HandleLumis> const&, boost::statechart::state_machine<statemachine::Machine, statemachine::Starting, std::allocator<void>, boost::statechart::null_exception_translator>&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x13dc9d)
   #27 0x7fd9d6cf4330 in boost::statechart::simple_state<statemachine::FirstLumi, statemachine::HandleLumis, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::react_impl(boost::statechart::event_base const&, void const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x13e330)
   #28 0x7fd9d6d1d9a0 in edm::EventProcessor::runToCompletion() (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1679a0)
   #29 0x4a97c7 in main::{lambda()#1}::operator()() const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/bin/slc6_amd64_gcc493/cmsRun+0x4a97c7)
   #30 0x41f2ca in main (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/bin/slc6_amd64_gcc493/cmsRun+0x41f2ca)
   #31 0x7fd9d398ed5c in __libc_start_main (/lib64/libc.so.6+0x1ed5c)
   #32 0x41f7f4 (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/bin/slc6_amd64_gcc493/cmsRun+0x41f7f4)

0x6110005c7ef8 is located 8 bytes to the left of 240-byte region [0x6110005c7f00,0x6110005c7ff0)
allocated by thread T0 here:
   #0 0x474635 in operator new(unsigned long) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/bin/slc6_amd64_gcc493/cmsRun+0x474635)
   #1 0x7fd9d5f662b6 in __gnu_cxx::new_allocator<double>::allocate(unsigned long, void const*) /mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/external/gcc/4.9.3/include/c++/4.9.3/ext/new_allocator.h:104
   #2 0x7fd9d5f662b6 in std::allocator_traits<std::allocator<double> >::allocate(std::allocator<double>&, unsigned long) /mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/external/gcc/4.9.3/include/c++/4.9.3/bits/alloc_traits.h:357
   #3 0x7fd9d5f662b6 in std::_Vector_base<double, std::allocator<double> >::_M_allocate(unsigned long) /mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/external/gcc/4.9.3/include/c++/4.9.3/bits/stl_vector.h:170
   #4 0x7fd9d5f662b6 in _M_allocate_and_copy<__gnu_cxx::__normal_iterator<double const*, std::vector<double> > > /mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/external/gcc/4.9.3/include/c++/4.9.3/bits/stl_vector.h:1224
   #5 0x7fd9d5f662b6 in std::vector<double, std::allocator<double> >::operator=(std::vector<double, std::allocator<double> > const&) /mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/external/gcc/4.9.3/include/c++/4.9.3/bits/vector.tcc:195
   #6 0x7fd9b9b40a88 in HcalTopology::HcalTopology(HcalDDDRecConstants const*, HcalTopologyMode::TriggerMode) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libGeometryCaloTopology.so+0x2da88)
   #7 0x7fd9b9141425 in HcalTopologyIdealEP::produce(HcalRecNumberingRecord const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginGeometryHcalEventSetup.so+0x3c425)
   #8 0x7fd9b9146dae in edm::eventsetup::CallbackProxy<edm::eventsetup::Callback<HcalTopologyIdealEP, boost::shared_ptr<HcalTopology>, HcalRecNumberingRecord, edm::eventsetup::ESPreFunctorDecorator<HcalRecNumberingRecord, edm::eventsetup::DependsOnCaller<HcalTopologyIdealEP, HcalRecNumberingRecord, IdealGeometryRecord, edm::eventsetup::DependsOnDoNothingCaller<HcalRecNumberingRecord> > > >, HcalRecNumberingRecord, boost::shared_ptr<HcalTopology> >::getImpl(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginGeometryHcalEventSetup.so+0x41dae)
   #9 0x7fd9d6caef8c in edm::eventsetup::DataProxy::get(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0xf8f8c)
   #10 0x7fd9d6d9c679 in edm::eventsetup::EventSetupRecord::getFromProxy(edm::eventsetup::DataKey const&, edm::eventsetup::ComponentDescription const*&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1e6679)
   #11 0x7fd9b91479a7 in CaloGeometryDBEP<HcalGeometry, CaloGeometryDBReader>::produceAligned(HcalGeometryRecord const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginGeometryHcalEventSetup.so+0x429a7)
   #12 0x7fd9b914c1ff in edm::eventsetup::CallbackProxy<edm::eventsetup::Callback<CaloGeometryDBEP<HcalGeometry, CaloGeometryDBReader>, boost::shared_ptr<CaloSubdetectorGeometry>, HcalGeometryRecord, edm::eventsetup::CallbackSimpleDecorator<HcalGeometryRecord> >, HcalGeometryRecord, boost::shared_ptr<CaloSubdetectorGeometry> >::getImpl(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginGeometryHcalEventSetup.so+0x471ff)
   #13 0x7fd9d6caef8c in edm::eventsetup::DataProxy::get(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0xf8f8c)
   #14 0x7fd9d6d9c679 in edm::eventsetup::EventSetupRecord::getFromProxy(edm::eventsetup::DataKey const&, edm::eventsetup::ComponentDescription const*&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1e6679)
   #15 0x7fd9b9e125b8 in CaloGeometryBuilder::produceAligned(CaloGeometryRecord const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginGeometryCaloEventSetupPlugins.so+0x455b8)
   #16 0x7fd9b9e174d7 in edm::eventsetup::CallbackProxy<edm::eventsetup::Callback<CaloGeometryBuilder, boost::shared_ptr<CaloGeometry>, CaloGeometryRecord, edm::eventsetup::CallbackSimpleDecorator<CaloGeometryRecord> >, CaloGeometryRecord, boost::shared_ptr<CaloGeometry> >::getImpl(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginGeometryCaloEventSetupPlugins.so+0x4a4d7)
   #17 0x7fd9d6caef8c in edm::eventsetup::DataProxy::get(edm::eventsetup::EventSetupRecord const&, edm::eventsetup::DataKey const&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0xf8f8c)
   #18 0x7fd9d6d9c679 in edm::eventsetup::EventSetupRecord::getFromProxy(edm::eventsetup::DataKey const&, edm::eventsetup::ComponentDescription const*&, bool) const (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1e6679)
   #19 0x7fd9ac589bf0 in HcalDigitizer::checkGeometry(edm::EventSetup const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libSimCalorimetryHcalSimProducers.so+0x3ebf0)
   #20 0x7fd9ac58aab1 in HcalDigitizer::beginRun(edm::EventSetup const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libSimCalorimetryHcalSimProducers.so+0x3fab1)
   #21 0x7fd9ac6794fb in edm::MixingModule::beginRun(edm::Run const&, edm::EventSetup const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/pluginSimGeneralMixingModulePlugins.so+0xaa4fb)
   #22 0x7fd9d6f55d2a in edm::one::EDProducerBase::doBeginRun(edm::RunPrincipal&, edm::EventSetup const&, edm::ModuleCallingContext const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x39fd2a)
   #23 0x7fd9d6f386b1 in edm::WorkerT<edm::one::EDProducerBase>::implDoBegin(edm::RunPrincipal&, edm::EventSetup const&, edm::ModuleCallingContext const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x3826b1)
   #24 0x7fd9d6d456b7 in decltype ({parm#1}()) edm::convertException::wrap<bool edm::Worker::doWork<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::Context const*)::{lambda()#1}>(bool edm::Worker::doWork<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::Context const*)::{lambda()#1}) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x18f6b7)
   #25 0x7fd9d6d45b2d in bool edm::Worker::doWork<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::Context const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x18fb2d)
   #26 0x7fd9d6d4668b in void edm::GlobalSchedule::runNow<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, edm::GlobalContext const*) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x19068b)
   #27 0x7fd9d6d46a9a in decltype ({parm#1}()) edm::convertException::wrap<void edm::GlobalSchedule::processOneGlobal<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, bool)::{lambda()#1}>(void edm::GlobalSchedule::processOneGlobal<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, bool)::{lambda()#1}) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x190a9a)
   #28 0x7fd9d6d46f5c in void edm::GlobalSchedule::processOneGlobal<edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0> >(edm::OccurrenceTraits<edm::RunPrincipal, (edm::BranchActionType)0>::MyPrincipal&, edm::EventSetup const&, bool) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x190f5c)
   #29 0x7fd9d6d309b9 in edm::EventProcessor::beginRun(statemachine::Run const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x17a9b9)
   #30 0x7fd9d6cd1497 in statemachine::HandleRuns::beginRun(statemachine::Run const&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x11b497)
   #31 0x7fd9d6cd1676 in statemachine::HandleRuns::setupCurrentRun() (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x11b676)
   #32 0x7fd9d6cd7574 in statemachine::NewRun::NewRun(boost::statechart::state<statemachine::NewRun, statemachine::HandleRuns, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::my_context) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x121574)
   #33 0x7fd9d6cf61d3 in boost::statechart::state<statemachine::HandleRuns, statemachine::HandleFiles, statemachine::NewRun, (boost::statechart::history_mode)0>::deep_construct(boost::intrusive_ptr<statemachine::HandleFiles> const&, boost::statechart::state_machine<statemachine::Machine, statemachine::Starting, std::allocator<void>, boost::statechart::null_exception_translator>&) (/mnt/build/davidlt/asan2/a/slc6_amd64_gcc493/cms/cmssw/CMSSW_7_6_ASAN_X_2015-10-19-1100/lib/slc6_amd64_gcc493/libFWCoreFramework.so+0x1401d3)

SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 HcalTopology::etaRange(HcalSubdetector, int) const
Shadow bytes around the buggy address:
 0x0c22800b0f80: 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa fa
 0x0c22800b0f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 0x0c22800b0fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa
 0x0c22800b0fb0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
 0x0c22800b0fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c22800b0fd0: 00 00 00 00 00 fa fa fa fa fa fa fa fa fa fa[fa]
 0x0c22800b0fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 0x0c22800b0ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa
 0x0c22800b1000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
 0x0c22800b1010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 0x0c22800b1020: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
 Addressable:           00
 Partially addressable: 01 02 03 04 05 06 07 
 Heap left redzone:       fa
 Heap right redzone:      fb
 Freed heap region:       fd
 Stack left redzone:      f1
 Stack mid redzone:       f2
 Stack right redzone:     f3
 Stack partial redzone:   f4
 Stack after return:      f5
 Stack use after scope:   f8
 Global redzone:          f9
 Global init order:       f6
 Poisoned by user:        f7
 Contiguous container OOB:fc
 ASan internal:           fe
==10226==ABORTING
@davidlt
Copy link
Contributor Author

davidlt commented Oct 20, 2015

@civanch @mdhildreth @Dr15Jones @ianna @bsunanda

Introduced by e4f299e
PR #10353

@ianna
Copy link
Contributor

ianna commented Oct 22, 2015

@bsunanda
Copy link
Contributor

I am submitting a PR sometime this afternoon.


From: Ianna Osborne [notifications@github.com]
Sent: 22 October 2015 11:30
To: cms-sw/cmssw
Cc: Sunanda Banerjee
Subject: Re: [cmssw] [ASAN][heap-buffer-overflow] Geometry/CaloTopology/src/HcalTopology.cc (#11979)

@bsunandahttps://github.com/bsunanda:
ieta ranges from -32 to 32:
http://cmslxr.fnal.gov/source/CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc?v=CMSSW_7_6_X_2015-10-14-2300#0185
The issue occurs when an eta range is requested for ieta equal 0:
http://cmslxr.fnal.gov/source/Geometry/CaloTopology/src/HcalTopology.cc?v=CMSSW_7_6_X_2015-10-14-2300#0845


Reply to this email directly or view it on GitHubhttps://github.com//issues/11979#issuecomment-150160966.

@bsunanda
Copy link
Contributor

Fixed in PR #12057

@davidlt
Copy link
Contributor Author

davidlt commented Oct 27, 2015

This is now merged, closing the issue.

@davidlt davidlt closed this as completed Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants