cms-sw / cmssw

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

[UBSAN][DQM] shift exponent too large for 32-bit type int #46483

Open smuzaffar opened 3 hours ago

smuzaffar commented 3 hours ago

There are few UBSAN errors about shift exponent too large for 32-bit type int [a]. Normally this indicates that there might be some logical error. @cms-sw/dqm-l2 , can you please check the code and see if we can avoid this errors.

One way to fix/avoid these errors is to use 1 << (variable&0x1F) instead of 1 << variable but I am not sure how portable this code will be.

[a] https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_14_2_X_2024-10-20-2300/ 27 DQM/GEM/plugins/GEMDAQStatusSource.cc:487:28: runtime error: shift exponent 32 is too large for 32-bit type 'int' 27 DQM/GEM/plugins/GEMDAQStatusSource.cc:559:58: runtime error: shift exponent 39 is too large for 32-bit type 'int' 27 [DQM/GEM/plugins/GEMDAQStatusSource.cc:560](https://github.com/cms-sw/cmssw/blob/master/DQM/GEM/plugins/GEMDAQStatusSource.cc#L560]:50: runtime error: shift exponent 39 is too large for 32-bit type 'int'

smuzaffar commented 2 hours ago

assign dqm

cmsbuild commented 2 hours ago

New categories assigned: dqm

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

cmsbuild commented 2 hours ago

cms-bot internal usage

cmsbuild commented 2 hours ago

A new Issue was created by @smuzaffar.

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

cms-bot commands are listed here