Skip to content

Trust: reuse named LLVM decls instead of snprintf.1 (re-#32122) - #32347

Merged
PurHur merged 1 commit into
masterfrom
fix/32122-reuse-named-snprintf
Aug 18, 2026
Merged

Trust: reuse named LLVM decls instead of snprintf.1 (re-#32122)#32347
PurHur merged 1 commit into
masterfrom
fix/32122-reuse-named-snprintf

Conversation

@PurHur

@PurHur PurHur commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Refs #32122, #31894.

Test plan

  • ./script/phpunit.sh --filter 'SnprintfRuntimeShrinkTest|LibcExternDeadDeclsRuntimeShrinkTest' → OK (36 tests, 684 assertions)
  • ./script/docker-exec.sh -- bash -lc 'printf %s "<?php echo \"hi\\n\";" > /tmp/hello32122.php; php bin/compile.php -o /tmp/hello32122.bin /tmp/hello32122.php && /tmp/hello32122.bin'hi
  • ./script/docker-exec.sh -- bash -lc 'printf %s "<?php echo 1.5, PHP_EOL;" > /tmp/echo15.php; php bin/compile.php -o /tmp/echo15.bin /tmp/echo15.php && /tmp/echo15.bin'1.5
  • Did not run ./script/release-readiness.sh (implementer warm-up skip) or ./script/aot-smoke.sh this turn.

Made with Cursor

lookupFunction-miss then addFunction() silently renamed libc snprintf when
the symbol already existed in the module, which is the Module.php:180 class
from #31894/#32122. Route snprintf through LibcExtern::ensureSnprintf and
register getNamedFunction hits for the remaining formatter/GC/parse_url leaves.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 926e600 into master Aug 18, 2026
1 check failed
@PurHur
PurHur deleted the fix/32122-reuse-named-snprintf branch August 18, 2026 18:20
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.

1 participant