Skip to content

Perf: strval of overflow floats via foreach matches Zend (#36386) - #37082

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

Perf: strval of overflow floats via foreach matches Zend (#36386)#37082
PurHur merged 1 commit into
masterfrom
agent/issue-36386-strval-overflowable-native-long

Conversation

@PurHur

@PurHur PurHur commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • strval() of overflow-promoted floats (e.g. PHP_INT_MAX + 1 via foreach / assign-from-fetch) printed empty under AOT while (string) / floatval / sprintf("%s") / echo matched Zend — leftover of Perf: lazy f64 overflow slot for native-long ±/× (#36386) #37051 lazy ±/× materialize.
  • Root cause: strval TYPE_VALUE arm passed raw $args[0]->value; floatval uses JitValueBox::valuePtrFromVariable. Also materialize overflowable native-long before the native-long arm.
  • php-src: ext/standard/type.c php_strval / convert_to_string.

Part of #36386

Test plan

  • ./script/phpunit.sh --filter StrvalOverflowableForeachAotTest → OK (4 tests, 20 assertions)
  • ./script/aot-smoke.sh → 9 passed, 0 failed (size gate OK)
  • make north-star5-verify-fast → OK (spine 8354/8354)
  • Not run: script/differential-sweep.sh --aot (no call/CFG shape change beyond strval arg pointer normalize)

Made with Cursor

TYPE_VALUE arm used raw ->value; prefer valuePtrFromVariable (peer floatval) and materialize lazy ±/× overflow before the native-long arm.

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