diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2016-10-06 10:36:12 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2016-10-06 10:36:25 +0200 |
commit | c9d3b9fb475861d03e7d9b913a12527a2023e152 (patch) | |
tree | 4f99bc21da1e1954ddc08a1ca6ef5391fafa5f23 /sapi/phpdbg/phpdbg.c | |
parent | b2d53e47ed0a141078c41331d4c232db979be967 (diff) | |
download | php-git-c9d3b9fb475861d03e7d9b913a12527a2023e152.tar.gz |
Use better fix for preventing too early freeing of interned strings
Works also with opcache now - just prevent zend_interned_strings_restore completely - zend_interned_strings_dtor will take care as phpdbg only ever uses one single request cycle per module cycle
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index a7fda1ddd2..bda5b5619f 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -797,13 +797,17 @@ static zend_module_entry sapi_phpdbg_module_entry = { STANDARD_MODULE_PROPERTIES }; +static void phpdbg_interned_strings_nothing(void) { } + static inline int php_sapi_phpdbg_module_startup(sapi_module_struct *module) /* {{{ */ { if (php_module_startup(module, &sapi_phpdbg_module_entry, 1) == FAILURE) { return FAILURE; } + /* prevent zend_interned_strings_restore from invalidating our string pointers too early (in phpdbg allocated memory only gets freed after module shutdown) */ + zend_interned_strings_restore = phpdbg_interned_strings_nothing; - phpdbg_booted=1; + phpdbg_booted = 1; return SUCCESS; } /* }}} */ |