Skip to content

Conversation

nielsdos
Copy link
Member

This happens because on ZTS we execute executor_globals_ctor which reset the freelist and p5s pointers, while on NTS we don't. On NTS we can reuse the caches but on ZTS we can't, the easiest fix is to call zend_shutdown_strtod when preloading is shut down. This regressed in GH-13974 and therefore only exists in PHP 8.4 and higher.

This happens because on ZTS we execute `executor_globals_ctor` which reset the
`freelist` and `p5s` pointers, while on NTS we don't.
On NTS we can reuse the caches but on ZTS we can't, the easiest fix is
to call `zend_shutdown_strtod` when preloading is shut down.
This regressed in phpGH-13974 and therefore only exists in PHP 8.4 and
higher.
@nielsdos nielsdos requested a review from dstogov as a code owner October 25, 2024 18:35
@nielsdos nielsdos linked an issue Oct 25, 2024 that may be closed by this pull request
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.

EG(strtod_state).freelist leaks with opcache.preload

2 participants