cvs: ZendEngine2 / zend_vm_execute.h zend_vm_execute.skl /tests bug35437.phpt
| From: | Dmitry Stogov | Date: | Thu, 01 Dec 2005 12:51:20 +0000 |
| Subject: | cvs: ZendEngine2 / zend_vm_execute.h zend_vm_execute.skl /tests bug35437.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4413@lists.php.net to get a copy of this message | ||
dmitry Thu Dec 1 07:51:20 2005 EDT
Modified files:
/ZendEngine2 zend_vm_execute.h zend_vm_execute.skl
/ZendEngine2/tests bug35437.phpt
Log:
Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4)
http://cvs.php.net/diff.php/ZendEngine2/zend_vm_execute.h?r1=1.92&r2=1.93&ty=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.92 ZendEngine2/zend_vm_execute.h:1.93
--- ZendEngine2/zend_vm_execute.h:1.92 Wed Nov 30 05:10:31 2005
+++ ZendEngine2/zend_vm_execute.h Thu Dec 1 07:51:18 2005
@@ -36,6 +36,10 @@
zend_execute_data execute_data;
+ if (EG(exception)) {
+ return;
+ }
+
/* Initialize execute_data */
EX(fbc) = NULL;
EX(object) = NULL;
http://cvs.php.net/diff.php/ZendEngine2/zend_vm_execute.skl?r1=1.3&r2=1.4&ty=u
Index: ZendEngine2/zend_vm_execute.skl
diff -u ZendEngine2/zend_vm_execute.skl:1.3 ZendEngine2/zend_vm_execute.skl:1.4
--- ZendEngine2/zend_vm_execute.skl:1.3 Thu Sep 22 15:03:02 2005
+++ ZendEngine2/zend_vm_execute.skl Thu Dec 1 07:51:19 2005
@@ -7,6 +7,10 @@
{%INTERNAL_LABELS%}
+ if (EG(exception)) {
+ return;
+ }
+
/* Initialize execute_data */
EX(fbc) = NULL;
EX(object) = NULL;
http://cvs.php.net/diff.php/ZendEngine2/tests/bug35437.phpt?r1=1.1&r2=1.2&ty=u
Index: ZendEngine2/tests/bug35437.phpt
diff -u /dev/null ZendEngine2/tests/bug35437.phpt:1.2
--- /dev/null Thu Dec 1 07:51:20 2005
+++ ZendEngine2/tests/bug35437.phpt Thu Dec 1 07:51:19 2005
@@ -0,0 +1,27 @@
+--TEST--
+Bug #35437 Segfault or Invalid Opcode 137/1/4
+--FILE--
+<?php
+function err2exception($errno, $errstr)
+{
+ throw new Exception("Error occuried: " . $errstr);
+}
+
+set_error_handler('err2exception');
+
+class TestClass
+{
+ function testMethod()
+ {
+ $GLOBALS['t'] = new stdClass;
+ }
+}
+
+try {
+ TestClass::testMethod();
+} catch (Exception $e) {
+ echo "Catched: ".$e->getMessage()."\n";
+}
+?>
+--EXPECT--
+Catched: Error occuried: Non-static method TestClass::testMethod() should not be called statically