Skip to content

Commit d92a89f

Browse files
committed
Fixed bug (segfault while build with zts and GOTO vm-kind)
1 parent 55d680e commit d92a89f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ PHP NEWS
33
?? ??? 2012, PHP 5.3.16
44

55
- Core:
6+
. Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
67
. Fixed bug #62763 (register_shutdown_function and extending class).
78
(Laruence)
89
. Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)

Zend/zend_vm_execute.skl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
44
{
55
zend_execute_data *execute_data;
66
zend_bool nested = 0;
7-
zend_bool original_in_execution = EG(in_execution);
87
{%HELPER_VARS%}
8+
{%EXECUTION_STATUS%}
99

1010
{%INTERNAL_LABELS%}
1111

Zend/zend_vm_gen.php

+7
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,13 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
850850
skip_blanks($f, $m[1], $m[3]."\n");
851851
}
852852
break;
853+
case "EXECUTION_STATUS":
854+
if ($kind != ZEND_VM_KIND_GOTO) {
855+
out($f, $m[1] . "zend_bool original_in_execution = EG(in_execution);\n");
856+
} else {
857+
out($f, $m[1] . "zend_bool original_in_execution = op_array? EG(in_execution) : 0;\n");
858+
}
859+
break;
853860
case "INTERNAL_LABELS":
854861
if ($kind == ZEND_VM_KIND_GOTO) {
855862
// Emit array of labels of opcode handlers and code for

0 commit comments

Comments
 (0)