Skip to content

Fix GH-25388: Stale ext/date tz cache after logging during startup - #25407

Open
lazerg wants to merge 2 commits into
php:PHP-8.4from
lazerg:fix/gh-25388-tzcache-startup
Open

lazerg wants to merge 2 commits into
php:PHP-8.4from
lazerg:fix/gh-25388-tzcache-startup

Conversation

@lazerg

@lazerg lazerg commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

When an error is logged during module startup, php_format_date() fills DATEG(tzcache) with startup memory. That memory is freed before the first request, but the pointer stays set, so a log written at request startup before RINIT (here the missing output_handler) reads the freed table. On the other hand, a cache built at request startup leaked, because RINIT reset the pointer to NULL.

The cache is now skipped while the executor is not active, and RINIT no longer clears it, since post-deactivate already frees it and sets it back to NULL.

Fixes #25388

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