-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Segmentation fault during request shutdown when memory limit is exceeded during closure initialization #12073
Comments
Nice reproducer, thank you! I'm investigating this. The problem is likely that |
Make sure we null/initialize/addref the relevant fields before allocating any memory. Fixes phpGH-12073
Make sure we null/initialize/addref the relevant fields before allocating any memory. Fixes phpGH-12073
Make sure we null/initialize/addref the relevant fields before allocating any memory. Fixes phpGH-12073
Make sure we null/initialize/addref the relevant fields before allocating any memory. Fixes phpGH-12073
Addref to relevant fields before allocating any memory. Also only set/remove the ZEND_ACC_HEAP_RT_CACHE flag after allocating memory. Fixes phpGH-12073
Addref to relevant fields before allocating any memory. Also only set/remove the ZEND_ACC_HEAP_RT_CACHE flag after allocating memory. Fixes phpGH-12073
Addref to relevant fields before allocating any memory. Also only set/remove the ZEND_ACC_HEAP_RT_CACHE flag after allocating memory. Fixes phpGH-12073
Thanks! |
Description
The following code:
reliably segfaults on PHP 8.2, 8.1. and 8.0 with opcache enabled (
-dopcache.enable_cli=1
).This is a simplified reproducer—originally seen on PHP 8.0.30, in the FPM SAPI, for a request that hit its configured memory limit on a line of code instantiating a closure: https://github.com/wikimedia/mediawiki/blob/f071c22a9a3e7e399dcf3256c96a952f15291a69/includes/Revision/RevisionStore.php#L1786
There is no segmentation fault if Opcache is disabled.
Backtrace of that original error:
PHP Version
PHP 8.2.9
Operating System
No response
The text was updated successfully, but these errors were encountered: