Skip to content

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Sep 18, 2025

BEGINRELEASENOTES

  • Add ugly code to trigger an error when reading garbage

ENDRELEASENOTES

This prevents an infinite loop from happening and consuming all the memory. Tested on GCC 15 and Clang 20 with all the combinations of {Debug,RelWithDebInfo,Release} builds, in 5 out of 6 it triggers one of the errors and with GCC in Debug it crashes from ROOT.

I think that s is a random 64 bit number (or at least it was big one when I checked with gdb), so the probability of not triggering the error should 1e15/2**64=5e-5 if this is true.

To test, from the build directory: export ROOT_LIBRARY_PATH=$PWD/tests before #841 is merged.

This prevents an infinite loop from happening and consuming all the memory.
Tested on GCC 15 and Clang 20 with all the combinations of
{Debug,RelWithDebInfo,Release} builds, in 5 out of 6 it triggers one of the
errors and with GCC in Debug it crashes from ROOT.
At least one happening with GCC < 15
Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a conceivable way to test that this truly triggers? Not sure how we would realistically get the garbage data, but maybe creating a faulty file with a slightly different EDM and then trying to read it similar as we do for the backwards compatibility tests?

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

Successfully merging this pull request may close these issues.

2 participants