From aaa2443e8980f9cf857f83a8c6bb8454d6d35383 Mon Sep 17 00:00:00 2001 From: Eric Norris Date: Wed, 8 Jan 2025 15:32:59 -0500 Subject: [PATCH] move initialization of error_backtrace to handle NTS Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com> --- Zend/zend.c | 1 - Zend/zend_execute_API.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend.c b/Zend/zend.c index 9c8ab08a0eb3..a85336f25155 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -812,7 +812,6 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{ executor_globals->in_autoload = NULL; executor_globals->current_execute_data = NULL; executor_globals->current_module = NULL; - ZVAL_UNDEF(&executor_globals->error_backtrace); executor_globals->exit_status = 0; #if XPFPA_HAVE_CW executor_globals->saved_fpu_cw = 0; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 6f4afa773414..bf96d5e58d23 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -140,6 +140,8 @@ void init_executor(void) /* {{{ */ original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv); #endif + ZVAL_UNDEF(&EG(error_backtrace)); + EG(symtable_cache_ptr) = EG(symtable_cache); EG(symtable_cache_limit) = EG(symtable_cache) + SYMTABLE_CACHE_SIZE; EG(no_extensions) = 0;