-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix GH-11529: Crash after dealing with an Apache request #11530
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
In an MPM worker scenario we have 1 module, N threads. Each thread must have their globals initialised. If we only initialise the filename fields in MINIT, then the threads have an uninitialized value. If the uninitialized value is not NULL, this leads to segfaults upon access.
As a side note, it strikes me as weird that |
Trying the patch right now and will report back asap. |
Apparently UMR means Uninitialized Memory Read |
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.
This looks sensible to me
Looking at the file at that commit, this looks like PHP 4 era code which doesn't seem to have a GINIT stage, so maybe that's why? |
Patch is fine, tests are now passing! Thanks !!! |
Thanks a lot for testing @drupol! This patch will be included in the next alpha. |
Thanks to you !!! We are now ready to ship PHP 8.3.0alpha2 (+3 patches) in Nix :) |
Ah that makes sense. I don't feel comfortable removing the line though since it's been there for a very long time, and one memory write extra doesn't hurt performance anyway so 🤷 |
In an MPM worker scenario we have 1 module, N threads. Each thread must have their globals initialised. If we only initialise the filename fields in MINIT, then the threads have an uninitialized value. If the uninitialized value is not NULL, this leads to segfaults upon access.