-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Initialize ping_auto_globals_mask to prevent undefined behaviour #10121
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
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.
Nice catch! We don't currently run preloading jobs with MSAN and only have a single test for auto_globals_jit
(sapi/phpdbg/tests/info_001.phpt) which is why I guess this was never caught. A test for this could be added though (forcing both preloading and auto_globals_jit
through the --INI--
section).
Thanks for the review. |
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.
Thank you! That looks perfect! Just a tiny nit.
17540e2
to
f5d1b7c
Compare
Thanks. I updated the test. :) |
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.
Looks good, thank you! I'll merge this tonight when I'm off work (this requires manual merging as it's targeting an older branch).
Thanks for the merge. |
@nielsdos Oh, sorry! I'll fix that in a second. |
I picked the wrong commit to reset to. Should be good now. Thanks for noticing. |
ping_auto_globals_mask
was not initialized on all paths towardsscript->ping_auto_globals_mask = ping_auto_globals_mask;
, which is undefined behaviour.