Fix GH-14596: phpdbg with asan and ZC_RC_DEBUG set crashes.

close GH-14607
This commit is contained in:
David Carlier 2024-06-19 20:45:05 +01:00
parent 49aaa7cd9f
commit 6704c60589
No known key found for this signature in database
GPG key ID: CEF290BB40D2086B
2 changed files with 9 additions and 5 deletions

4
NEWS
View file

@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.2.22
- PHPDBG:
. Fixed bug GH-14596 (crashes with ASAN and ZEND_RC_DEBUG=1).
(David Carlier)
04 Jul 2024, PHP 8.2.21

View file

@ -229,13 +229,13 @@ static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */
if (zend_vm_kind() != ZEND_VM_KIND_HYBRID) {
/* phpdbg cannot work JIT-ed code */
zend_string *key = zend_string_init(ZEND_STRL("opcache.jit"), 1);
zend_string *value = zend_string_init(ZEND_STRL("off"), 1);
zend_string *key = zend_string_init(ZEND_STRL("opcache.jit"), false);
zend_string *value = zend_string_init(ZEND_STRL("off"), false);
zend_alter_ini_entry(key, value, ZEND_INI_SYSTEM, ZEND_INI_STAGE_STARTUP);
zend_alter_ini_entry_ex(key, value, ZEND_INI_SYSTEM, ZEND_INI_STAGE_STARTUP, false);
zend_string_release(key);
zend_string_release(value);
zend_string_release_ex(key, false);
zend_string_release_ex(value, false);
}
return SUCCESS;