cvs: ZendEngine2 / zend.c zend_execute_API.c zend_globals.h
| From: | Antony Dovgal | Date: | Mon, 11 Sep 2006 14:28:20 +0000 |
| Subject: | cvs: ZendEngine2 / zend.c zend_execute_API.c zend_globals.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5243@lists.php.net to get a copy of this message | ||
tony2001 Mon Sep 11 14:28:20 2006 UTC
Modified files:
/ZendEngine2 zend.c zend_execute_API.c zend_globals.h
Log:
fix #38779 (engine crashes when require()'ing file with syntax error through userspace stream
wrapper)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.369&r2=1.370&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.369 ZendEngine2/zend.c:1.370
--- ZendEngine2/zend.c:1.369 Tue Aug 8 16:58:06 2006
+++ ZendEngine2/zend.c Mon Sep 11 14:28:19 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.c,v 1.369 2006/08/08 16:58:06 tony2001 Exp $ */
+/* $Id: zend.c,v 1.370 2006/09/11 14:28:19 tony2001 Exp $ */
#include "zend.h"
#include "zend_extensions.h"
@@ -863,6 +863,7 @@
EG(current_execute_data) = NULL;
EG(current_module) = NULL;
EG(exit_status) = 0;
+ EG(active) = 0;
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.380&r2=1.381&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.380 ZendEngine2/zend_execute_API.c:1.381
--- ZendEngine2/zend_execute_API.c:1.380 Wed Aug 30 12:32:20 2006
+++ ZendEngine2/zend_execute_API.c Mon Sep 11 14:28:19 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.380 2006/08/30 12:32:20 tony2001 Exp $ */
+/* $Id: zend_execute_API.c,v 1.381 2006/09/11 14:28:19 tony2001 Exp $ */
#include <stdio.h>
#include <signal.h>
@@ -202,6 +202,8 @@
EG(scope) = NULL;
EG(This) = NULL;
+
+ EG(active) = 1;
}
static int zval_call_destructor(zval **zv TSRMLS_DC)
@@ -339,6 +341,7 @@
FREE_HASHTABLE(EG(in_autoload));
}
} zend_end_try();
+ EG(active) = 0;
}
@@ -649,6 +652,10 @@
int fname_len;
zstr colon, fname, lcname;
+ if (!EG(active)) {
+ return FAILURE; /* executor is already inactive */
+ }
+
if (EG(exception)) {
return FAILURE; /* we would result in an instable executor otherwise */
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_globals.h?r1=1.161&r2=1.162&diff_format=u
Index: ZendEngine2/zend_globals.h
diff -u ZendEngine2/zend_globals.h:1.161 ZendEngine2/zend_globals.h:1.162
--- ZendEngine2/zend_globals.h:1.161 Tue Jul 18 09:08:06 2006
+++ ZendEngine2/zend_globals.h Mon Sep 11 14:28:19 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_globals.h,v 1.161 2006/07/18 09:08:06 dmitry Exp $ */
+/* $Id: zend_globals.h,v 1.162 2006/09/11 14:28:19 tony2001 Exp $ */
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
@@ -229,6 +229,8 @@
zend_property_info std_property_info;
+ zend_bool active;
+
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};