Repository navigation
Conversation
ndossche
approved these changes
Nov 8, 2026
ndossche
left a comment
Member
There was a problem hiding this comment.
Thanks. 8.4 isn't affected because it fatal errors at that point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When there is no SHM backend, zend_shared_alloc_startup() returned NO_SHM_BACKEND with smm_shared_globals still pointing at its local tmp_shared_globals. The other early returns already reset it to NULL. If the engine is started again in the same process with file_cache_only (embed SAPI), startup is skipped and zend_accel_in_shm() reads the dead stack frame. This resets it before that return too, as suggested in the issue.
The early return was added in e4078a6, so this targets PHP-8.5. I checked it with the embed reproducer from the issue on an ASan build without SHM backends: the stack-use-after-return is gone and opcache_compile_file() returns true.
Fixes #25195