Skip to content

Commit 9931ba7

Browse files
committed
Fix use-of-uninitialized-value of EG(last_fatal_error_backtrace) with ZTS
Static variables are zeroed, but ts memory is not. Hence, we need to do it ourselves.
1 parent 2ea386a commit 9931ba7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Zend/zend.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,8 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{
847847
sizeof(executor_globals->strtod_state.freelist));
848848
executor_globals->strtod_state.p5s = NULL;
849849
executor_globals->strtod_state.result = NULL;
850+
executor_globals->fatal_error_backtrace_on = false;
851+
ZVAL_UNDEF(&executor_globals->last_fatal_error_backtrace);
850852
}
851853
/* }}} */
852854

0 commit comments

Comments
 (0)