-
Notifications
You must be signed in to change notification settings - Fork 7.9k
dl() breaks expectations regarding permanent or interned strings #9196
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
Comments
revert bfb4ee7 once fixed |
cmb69
added a commit
to cmb69/php-src
that referenced
this issue
Sep 29, 2024
Prior to running the tests, the test runner checks for all generally available extensions; it does this by scanning the `extension_dir` for files matching the typical extension pattern, but verifies that the file is actually a PHP extension by calling `dl()`. However, `dl()` has known issues[1]. On Windows CI we always get an ugly "zend_mm_heap corrupted" message, and we even can't `dl()` ext/mysql when OPcache is enabled[2]. So we better avoid the double-check with `dl()`, which is unlikely to be necessary anyway. [1] <php#9196> [2] <php#8508>
cmb69
added a commit
that referenced
this issue
Oct 3, 2024
Prior to running the tests, the test runner checks for all generally available extensions; it does this by scanning the `extension_dir` for files matching the typical extension pattern, but verifies that the file is actually a PHP extension by calling `dl()`. However, `dl()` has known issues[1]. On Windows CI we always get an ugly "zend_mm_heap corrupted" message, and we even can't `dl()` ext/mysql when OPcache is enabled[2]. So we better avoid the double-check with `dl()`, which is unlikely to be necessary anyway. [1] <#9196> [2] <#8508>
cmb69
added a commit
to cmb69/php-src
that referenced
this issue
Nov 1, 2024
`dl()` has known issues regarding permanent strings[1], so we better avoid it, even if that means that we need to spawn two sub-processes. [1] <php#9196>
cmb69
added a commit
that referenced
this issue
Nov 1, 2024
Avoid dl() in bug77578.phpt `dl()` has known issues regarding permanent strings[1], so we better avoid it, even if that means that we need to spawn two sub-processes. [1] <#9196>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Creating this ticket to keep track of some issues related to dl() and permanent / interned strings:
Extensions loaded during a
dl()
call will try to allocate persistent interned strings for class names, function names, ini entries, etc. Normally, this is not allowed during a request.The default in-request implementation of
zend_string_init_interned
still allows it, but the opcache implementation will simply return a non-interned string.Calling dl() breaks in RC_DEBUG builds: #8606
This also breaks internal enums. The test in this branch will crash in debug builds: https://github.com/php/php-src/compare/master...arnaud-lb:php-src:internal-enums-dl-crash?expand=1
PHP Version
PHP 8.0
Operating System
No response
The text was updated successfully, but these errors were encountered: