Skip to content

Perf: printf/sprintf %s of overflowable native-long matches Zend (#36386) - #37068

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36386-printf-overflowable-native-long
Sep 6, 2026
Merged

Perf: printf/sprintf %s of overflowable native-long matches Zend (#36386)#37068
PurHur merged 1 commit into
masterfrom
agent/issue-36386-printf-overflowable-native-long

Conversation

@PurHur

@PurHur PurHur commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: ext/standard/formatted_print.c php_formatted_print / convert_to_string.

Test plan

  • ./script/phpunit.sh --filter 'SprintfOverflowableNativeLongAotTest|EchoOverflowableNativeLongAotTest|NativeLongOverflowHeapLazyAotTest'9/9
  • ./script/aot-smoke.sh9/9 + size gate OK
  • make north-star5-verify-fast → OK (spine 8349/8349)
  • script/differential-sweep.sh --aot --repeat 3 (printf/sprintf overflow cases) → 3/3
  • Manual 5× recompile with PHP_COMPILER_CACHE=0: assign overflow, assign mul-add, inline overflow, inline mul-add — all MATCH Zend

Closes nothing (epic #36386 stays open). Part of #36386.

Made with Cursor

)

extractAsCString fell through TYPE_VALUE to a constant empty C string after
lazy ±/×/`/` materialize; type-switch boxed args and overflow flag+f64 slots
instead (peer of #37064 echo). Free only the selected arm buffer via phi.

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.

1 participant