-
Notifications
You must be signed in to change notification settings - Fork 62
Add ugly code to trigger an error when reading garbage #846
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
Conversation
tmadlener
left a comment
There was a problem hiding this 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?
363ea4b to
281fa7f
Compare
|
I think the test is working now with either the exception or a crash. I'm not sure if this will hold in the future with newer compilers. |
b64cd4a to
b9c3887
Compare
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
b9c3887 to
cdf0b09
Compare
BEGINRELEASENOTES
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
sis 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/testsbefore #841 is merged.