summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_execute.h
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-05-25 19:12:24 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-05-26 17:45:25 +0200
commit8483a21f29fbfd8d86ddf2eb2b7db0ae0b462949 (patch)
treeb802051897238ecb5deeaa6872a38ad1d2798b9e /Zend/zend_vm_execute.h
parente483761a1e8ab058d9155688434c5fa9138f5ae1 (diff)
downloadphp-git-8483a21f29fbfd8d86ddf2eb2b7db0ae0b462949.tar.gz
Fix several mostly Windows related phpdbg bugs
* Properly initialize PHPDBG_G(watch_tmp) Otherwise that may cause segfaults in ZTS builds. * Deactivate potentially remaining watchpoints after REPL Otherwise the memory could still be protected, resulting in segfaults during shutdown. * NULL zend_handlers_table after freeing As of commit 4130fe4[1], the `zend_handlers_table` is explicitly freed in the `zend_vm_dtor()`. Since phpdbg (and maybe some other SAPIs) may restart the engine afterwards, we have to make sure that the table is also NULLed. * Only set context option if there is a context In other words, we must not follow the null pointer. * Cater to file handles without attached console File handles do not necessarily have an attached console (for instance, pipes do not), in which case `GetConsoleScreenBufferInfo()` fails. In this case we set a default value (`40`) for lines like on other systems. [1] <http://git.php.net/?p=php-src.git;a=commit;h=4130fe437a5db7ead1444d3748bd0fbad9829cb2>
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r--Zend/zend_vm_execute.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 13d55291f9..7af6b31501 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -61348,6 +61348,7 @@ void zend_vm_dtor(void)
if (zend_handlers_table) {
zend_hash_destroy(zend_handlers_table);
free(zend_handlers_table);
+ zend_handlers_table = NULL;
}
}