Skip to content

Fix GH-22023 crash during ZTS thread startup#22027

Open
shivammathur wants to merge 1 commit into
php:PHP-8.5from
shivammathur:fix-issue-22023-php-8.5
Open

Fix GH-22023 crash during ZTS thread startup#22027
shivammathur wants to merge 1 commit into
php:PHP-8.5from
shivammathur:fix-issue-22023-php-8.5

Conversation

@shivammathur
Copy link
Copy Markdown
Member

Fixes GH-22023 by initializing last_fatal_error_backtrace in executor_globals_ctor().

On Apache + ZTS, zend_new_thread_end_handler() may refresh INI caches before init_executor() runs for the new thread. If session.use_trans_sid=1 triggers its startup deprecation in that window, zend_error_zstr_at() can destroy EG(last_fatal_error_backtrace) before it has been initialized, causing an access violation and Apache child restart.

This change makes the per-thread executor globals safe for that early warning path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant