1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00

Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78973
This commit is contained in:
Nikita Popov
2019-12-16 18:53:32 +01:00
3 changed files with 20 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #78973: Destructor during CV freeing causes segfault if opline never saved
--FILE--
<?php
function test($x) {
}
test(new class {
public function __destruct() {
debug_print_backtrace();
}
});
?>
--EXPECTF--
#0 class@anonymous->__destruct() called at [%s:4]
#1 test() called at [%s:5]
+1
View File
@@ -2738,6 +2738,7 @@ ZEND_VM_HOT_HELPER(zend_leave_helper, ANY, ANY)
{
zend_execute_data *old_execute_data;
uint32_t call_info = EX_CALL_INFO();
SAVE_OPLINE();
if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP|ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS|ZEND_CALL_ALLOCATED)) == 0)) {
i_free_compiled_variables(execute_data);
+2
View File
@@ -1084,6 +1084,7 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper
{
zend_execute_data *old_execute_data;
uint32_t call_info = EX_CALL_INFO();
SAVE_OPLINE();
if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP|ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS|ZEND_CALL_ALLOCATED)) == 0)) {
i_free_compiled_variables(execute_data);
@@ -51458,6 +51459,7 @@ zend_leave_helper_SPEC_LABEL:
{
zend_execute_data *old_execute_data;
uint32_t call_info = EX_CALL_INFO();
SAVE_OPLINE();
if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP|ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS|ZEND_CALL_ALLOCATED)) == 0)) {
i_free_compiled_variables(execute_data);