-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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 for enabled observers when calling trait method of internal trait when opcache is loaded #13712
Comments
/cc @bwoebi |
I can verify this, php-src/ext/opcache/zend_persist.c Lines 731 to 733 in bf43113
I suppose the check here is not good enough to cover traits. I'm not sure how to recognize a trait inherited method here. |
…g trait method of internal trait when opcache is loaded Inherited methods regardless of source must share the original runtime cache. Traits were missed. This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these. On top of that, also fixing the minimum base of the shared opcache memory to 0x4000 to avoid a possible 0x0 base, which may cause all sorts of segfaults. (Breaks WSL 1.)
…g trait method of internal trait when opcache is loaded Inherited methods regardless of source must share the original runtime cache. Traits were missed. This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these. On top of that, also fixing the minimum base of the shared opcache memory to 0x4000 to avoid a possible 0x0 base, which may cause all sorts of segfaults. (Breaks WSL 1.)
…g trait method of internal trait when opcache is loaded Inherited methods regardless of source must share the original runtime cache. Traits were missed. This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these. On top of that, also fixing the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of segfaults. (Breaks WSL 1.)
…g trait method of internal trait when opcache is loaded Inherited methods regardless of source must share the original runtime cache. Traits were missed. This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these. On top of that, also fixing the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of segfaults. (Breaks WSL 1.)
Description
Perform the following steps:
./buildconf
./configure --enable-debug --enable-zend-test --enable-fpm
make -j$(nproc)
Create the following files:
crasher/fpm.conf
crasher/php.ini
crasher/test.php
Run
sapi/fpm/php-fpm -y crasher/fpm.conf -c crasher/ -F
And then send a request to FPM. I'm using: https://github.com/akerouanton/fcgi-client via
fcgi-client get 127.0.0.1:9001 crasher/test.php
Now observe the the FPM worker dies:
Running in gdb:
PHP Version
git master
Operating System
Ubuntu 23.10
The text was updated successfully, but these errors were encountered: