From: Dmitry Stogov Date: Thu, 1 Dec 2005 12:51:19 +0000 (+0000) Subject: Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4) X-Git-Tag: RELEASE_2_0_2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a139e19fe39812ac8b230a765a070dd67bf4d1eb;p=php Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4) --- diff --git a/Zend/tests/bug35437.phpt b/Zend/tests/bug35437.phpt new file mode 100755 index 0000000000..eecdee9683 --- /dev/null +++ b/Zend/tests/bug35437.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #35437 Segfault or Invalid Opcode 137/1/4 +--FILE-- +getMessage()."\n"; +} +?> +--EXPECT-- +Catched: Error occuried: Non-static method TestClass::testMethod() should not be called statically diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 7a6dc541d9..b7c9e60a4b 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -36,6 +36,10 @@ ZEND_API void execute(zend_op_array *op_array TSRMLS_DC) zend_execute_data execute_data; + if (EG(exception)) { + return; + } + /* Initialize execute_data */ EX(fbc) = NULL; EX(object) = NULL; diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl index 6cfd1bbcd3..9a3bd5038d 100644 --- a/Zend/zend_vm_execute.skl +++ b/Zend/zend_vm_execute.skl @@ -7,6 +7,10 @@ ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC) {%INTERNAL_LABELS%} + if (EG(exception)) { + return; + } + /* Initialize execute_data */ EX(fbc) = NULL; EX(object) = NULL;