Skip to content

Commit 16c9652

Browse files
authored
Fix use-of-uninitialized-value of EG(last_fatal_error_backtrace) with ZTS (GH-17639)
Static variables are zeroed, but ts memory is not. Hence, we need to do it ourselves.
1 parent b4f275f commit 16c9652

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
@@ -1050,6 +1050,8 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */
10501050
CG(map_ptr_last) = 0;
10511051
#endif /* ZTS */
10521052
EG(error_reporting) = E_ALL & ~E_NOTICE;
1053+
EG(fatal_error_backtrace_on) = false;
1054+
ZVAL_UNDEF(&EG(last_fatal_error_backtrace));
10531055

10541056
zend_interned_strings_init();
10551057
zend_startup_builtin_functions();

0 commit comments

Comments
 (0)