fix: protect against out of bounds access - #425
Conversation
560856f to
bbf76f6
Compare
|
I think it would be good to change all the comparisons to test |
jmcarcell
left a comment
There was a problem hiding this comment.
These comments are for myself of which parts I am convinced that are a fix.
| std::pair<float, float> OverlayTiming::define_time_windows(const std::string& collection_name) const { | ||
| try { | ||
| return {m_timeWindows.value().at(collection_name)[0], m_timeWindows.value().at(collection_name)[1]}; | ||
| return {m_timeWindows.value().at(collection_name).at(0), m_timeWindows.value().at(collection_name).at(1)}; |
There was a problem hiding this comment.
All brackets where changed to at, this is not needed
There was a problem hiding this comment.
I think I've undone the relevant parts of my over-eager replace all (I was unsure of how to interpret your message).
If there's anything left, or anything that you'd like to move to at(), can you please mark it directly?
|
@tmadlener @jmcarcell clang-tidy started to fail on things that seem unrelated to this PR. What do we do? |
This PR fixes a minor issue discovered in OverlayTiming when testing #413 at scale.
It would be good to merge this before #413, so that 413 would rebase cleanly
BEGINRELEASENOTES
OverlayTimingindexing its output MCParticle collection with the-1of an unset relation. Calorimeter contributions without an attached particle caused an out-of-bounds access that crashed when the contributions were written out.ENDRELEASENOTES