Skip to content

Stdlib: thin AOT stream_get_contents php://memory via libc FILE* (#27437) - #27845

Merged
PurHur merged 1 commit into
masterfrom
fix/27437-stream-get-contents-aot
Aug 5, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/27437-stream-get-contents-aot

Conversation

@PurHur

@PurHur PurHur commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference

Test plan

  • Issue repro ×3 AOT: compile rc=0, prints 'hi'
  • Offset/length edges match Zend/VM ('he' / 'ello' / '')
  • StreamReadRuntimeShrinkTest + StreamIoRuntimeShrinkTest + AotRegressionFixtureCatalogTest OK
  • AOT fixture stream_get_contents_php_memory.phpt

Not covered: full ci-fast; non-seekable stream_get_contents under thin AOT (pipe) — seekable remaining-size path covers the issue repro.

Made with Cursor

NestedJIT StreamReadJitHelper→VmFs cannot see JitStreamIoKernel's FILE*
table (php://memory is tmpfile()). Force a libc stream_get_contents ABI
alongside fgets/fseek/ftell so fwrite+rewind+get_contents returns the
buffer under thin standalone AOT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 82d236f into master Aug 5, 2026
1 check failed
@PurHur
PurHur deleted the fix/27437-stream-get-contents-aot branch August 5, 2026 18:11
PurHur added a commit that referenced this pull request Aug 5, 2026
…27859)

Restore verified-fresh lowering_source_fingerprint after seven lowering
commits drifted past #27831, unblocking north-star5-fast / user_release_ready.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: AOT stream_get_contents(php://memory) segfaults after build — VM/JIT match Zend (ext/standard/file.c)

1 participant