Skip to content

A call passing cell (mixed) values to a typed variadic param packs them raw: the callee reads tagged words as ints. #184

Closed

Description

@blacktrs

Summary

A call passing cell (mixed) values to a typed variadic param packs them raw: the callee reads tagged words as ints.

Repro

<?php
function f(int $x, int ...$m): int { return $x + array_sum($m); }
function g(mixed $a): mixed { return f($a[0], $a[1], $a[2]); }
echo g([1, 2, 3]), "\n";

Expected (php)

6

Actual (manticore 81d45956, Darwin arm64)

-8444249301319674

Tracking

Known-bug repro: tests/aot/repro/wrong/variadic_pack_cell_args_typed_param.php — bash tests/aot/xfail.sh -k variadic_pack_cell_args_typed_param 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
    wrong-answer
    on Oct 11, 2026
  2. added a commit that references this issue on Oct 11, 2026
    c54eb48
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

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions