Skip to content

Commit 77d4879

Browse files
committed
Fix segfault when checking goto in finally if resolve was delayed to runtime
This fixed the following two tests failed: - Zend/tests/exception_002.phpt - Zend/tests/jump13.phpt
1 parent 6a87a21 commit 77d4879

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,8 +2278,8 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
22782278
Z_TYPE_P(label) = IS_NULL;
22792279

22802280
if (op_array->last_try_catch) {
2281-
zend_uint i, op_num = opline - CG(active_op_array)->opcodes;
2282-
for (i=0; i<op_array->last_try_catch; i++) {
2281+
zend_uint i, op_num = opline - op_array->opcodes;
2282+
for (i=0; i < op_array->last_try_catch; i++) {
22832283
if (op_array->try_catch_array[i].try_op > op_num) {
22842284
break;
22852285
}

0 commit comments

Comments
 (0)