cms-sw / cmssw

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

Bug in L1TStage2EMTF #46182

Open Dr15Jones opened 1 week ago

Dr15Jones commented 1 week ago

UBSAN reported

114 DQM/L1TMonitor/src/L1TStage2EMTF.cc:1009:59: runtime error: index 2 out of bounds for type 'MonitorElement *[2]'

which corresponds to https://github.com/cms-sw/cmssw/blob/6d26b89d99a92507aad02623bd3feac40f65d369/DQM/L1TMonitor/src/L1TStage2EMTF.cc#L1009

and the member data is defined here https://github.com/cms-sw/cmssw/blob/6d26b89d99a92507aad02623bd3feac40f65d369/DQM/L1TMonitor/interface/L1TStage2EMTF.h#L119

where the variable layer is defined here https://github.com/cms-sw/cmssw/blob/6d26b89d99a92507aad02623bd3feac40f65d369/DQM/L1TMonitor/src/L1TStage2EMTF.cc#L1001

and comes from the member data of the hit here https://github.com/cms-sw/cmssw/blob/6d26b89d99a92507aad02623bd3feac40f65d369/DataFormats/L1TMuon/interface/EMTFHit.h#L352

NOTE that the comment above says layer can be value 2.

cmsbuild commented 1 week ago

cms-bot internal usage

cmsbuild commented 1 week ago

A new Issue was created by @Dr15Jones.

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

cms-bot commands are listed here

Dr15Jones commented 1 week ago

assign DQM/L1TMonitor

cmsbuild commented 1 week ago

New categories assigned: dqm

@antoniovagnerini,@nothingface0,@rvenditti,@syuvivida,@tjavaid you have been requested to review this Pull request/Issue and eventually sign? Thanks

makortel commented 1 week ago

@cms-sw/l1-l2

aloeliger commented 1 week ago

@eyigitba

eyigitba commented 1 week ago

I just got back from vacation. I'll have a look at this soon