Skip to content

strrev() called with a spread argument fails to compile. #644

Closed

Description

@blacktrs

Summary

strrev() called with a spread argument fails to compile.

Repro

<?php
/** @param string[] $c */
function f(array $c): string { return strrev(...$c); }
echo f(["abc"]), "\n";

Expected (php)

cba

Actual (manticore 783f6c3c, Darwin arm64)

compile failed (rc=75):
/tmp/manticore_12920.s0.ll:22984:22: error: use of undefined value '%r43'
 22984 |   %r3 = inttoptr i64 %r43 to ptr
       |                      ^
1 error generated.
assemble: part 0 failed to build; IR at /tmp/manticore_12920.s0.ll
assemble: shared split failed; assembling the module as before
/tmp/manticore_<pid>.ll:46207:22: error: use of undefined value '%r43'
 46207 |   %r3 = inttoptr i64 %r43 to ptr

Tracking

Known-bug repro: tests/aot/repro/crash/builtin_spread_strrev.php — bash tests/aot/xfail.sh -k builtin_spread_strrev reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    crash
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions