Fix GH-11529: Crash after dealing with an Apache request#11530
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 |
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.