Skip to content

php-in-php: drop always-on LibcExtern printf (#31706) - #31708

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-php-printf-31706
Aug 17, 2026
Merged

php-in-php: drop always-on LibcExtern printf (#31706)#31708
PurHur merged 1 commit into
masterfrom
agent/runtime-php-printf-31706

Conversation

@PurHur

@PurHur PurHur commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #31706

C / always-on shrink

  • Removed 1 always-on libc decl row from lib/JIT/LibcExtern.php (printf).
  • lib/AOT/runtime/*.c still empty (no new C).

Test plan

  • ./script/phpunit.sh --filter 'LibcExternDeadDeclsRuntimeShrinkTest|LibcNameCollisionRuntimeShrinkTest|PrintfBuiltinTest::testVm'OK (20 tests, 191 assertions)
  • ./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''printf("%s\n", "ok");'\'''ok
  • Same under php bin/jit.phpok
  • AOT printf native binary still segfaults on master too (RUN:139) — not a regression from this drop; PrintfBuiltinTest::testAotNativeBinaryMatchesPhpSubset pre-existing

php-src reference

  • ext/standard/formatted_print.cPHP_FUNCTION(printf) (user-script semantics stay in PHP)

Made with Cursor

NestedJIT header/cookie/echo emitters declare printf(3) module-locally via
ensurePrintf(); user-script printf() stays on JitPrintf / __compiler_printf.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit c7d81cf into master Aug 17, 2026
1 check failed
@PurHur
PurHur deleted the agent/runtime-php-printf-31706 branch August 17, 2026 00:24
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.

php-in-php: drop always-on LibcExtern printf after NestedJIT module-local (#31606/#31682 shape)

1 participant