Repository navigation
Grow smart_str buffers through functions every PHP release exports - #6776
Merged
Merged
Conversation
ondrejmirtes
force-pushed
the
turbo-smart-str-pins
branch
2 times, most recently
from
October 22, 2026 19:53
5da6a18 to
4a5187b
Compare
Recent patch releases (8.3.36 and its siblings) changed zend_smart_str.h's inline appending helpers to grow the buffer through a new smart_str_ferealloc(). The shared core is compiled against one version's headers and must load on every patch release of every supported minor; built against the new headers, it imports smart_str_ferealloc(), which the earlier releases do not export, and fails to load there: a core rebuilt in CI against the 8.3.36 devel pack failed to load on the runner's PHP 8.5.11 NTS on Windows with LoadLibrary error 127. 2.3.x's runs reuse a core built before 8.3.36 shipped, so the next change to turbo-ext/src would have hit it. The helpers the extension uses are pinned in abi.h to grow through smart_str_erealloc(), as they did before, which every release exports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMNnG2Zo7wgvSZCzjdk17X
ondrejmirtes
force-pushed
the
turbo-smart-str-pins
branch
from
October 22, 2026 19:55
4a5187b to
a9d6b5e
Compare
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.
Recent PHP patch releases (8.3.36 and its siblings) changed
zend_smart_str.h's inline appending helpers to grow the buffer through a newsmart_str_ferealloc(). The turbo extension's shared core is compiled against one version's headers but must load on every patch release of every supported minor. A core built against the new headers importssmart_str_ferealloc(), which earlier patch releases don't export, so the core fails to load there.Found in #6775: its CI rebuilt the Windows core against the 8.3.36 devel pack, and the extension then failed to load that core on the runner's PHP 8.5.11 NTS (
LoadLibraryerror 127). The other Windows variants installed newer patch releases and passed. On 2.3.x the problem is hidden because CI reuses a core built before 8.3.36 shipped, so the next change toturbo-ext/srcwould have hit it. On Linux the same import resolves lazily, and would surface as an unresolved symbol on an older patch release.The fix pins the helpers the extension uses in
abi.h, next to the other codegen pins, so they grow the buffer throughsmart_str_erealloc()as they did before. Every release exports that function. This PR changesturbo-ext/src, so its CI rebuilds the core against 8.3.36 and runs the Windows PHP 8.5 NTS job against it.🤖 Generated with Claude Code
https://claude.ai/code/session_01MMNnG2Zo7wgvSZCzjdk17X