Skip to content

An exception thrown by a function called through an erased callable reports line 0 for the call site in getTrace() #598

Open

Description

@blacktrs

Summary

An exception thrown by a function called through an erased callable reports line 0 for the call site in getTrace().

Repro

<?php
function boom(mixed $v): never { throw new \RuntimeException('boom'); }
function lines(mixed $f): void {
    try { $f('a'); } catch (\RuntimeException $e) { echo $e->getTrace()[0]['line'] ?? '?', "\n"; }
}
lines('boom');

Expected (php)

5

Actual (manticore 9ccbe2ba, Darwin arm64)

0

Tracking

Known-bug repro: tests/aot/repro/wrong/erased_invoke_trace_line_zero.php — bash tests/aot/xfail.sh -k erased_invoke_trace_line_zero 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 Nov 8, 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

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions