diff options
author | Antony Dovgal <tony2001@php.net> | 2006-09-11 14:30:08 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-09-11 14:30:08 +0000 |
commit | d6ee9d48109814a3ba8e9879f5ab63466f4327be (patch) | |
tree | 9e4ab95ef510c1a5eff62ae3709e3a9ff87e57fc /Zend/zend_execute_API.c | |
parent | 0a1f5d12a127f0cbf3330a2eada88e7744d34eb1 (diff) | |
download | php-git-d6ee9d48109814a3ba8e9879f5ab63466f4327be.tar.gz |
MFH: fix #38779 (engine crashes when require()'ing file with syntax error through userspace stream wrapper)
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4170a30e7c..ab535ea74d 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -188,6 +188,8 @@ void init_executor(TSRMLS_D) EG(scope) = NULL; EG(This) = NULL; + + EG(active) = 1; } static int zval_call_destructor(zval **zv TSRMLS_DC) @@ -316,6 +318,7 @@ void shutdown_executor(TSRMLS_D) FREE_HASHTABLE(EG(in_autoload)); } } zend_end_try(); + EG(active) = 0; } @@ -613,6 +616,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS char *fname, *colon; int fname_len; + if (!EG(active)) { + return FAILURE; /* executor is already inactive */ + } + if (EG(exception)) { return FAILURE; /* we would result in an instable executor otherwise */ } |