Skip to content

getTraceAsString omits call arguments in frames: "A->m()" where php prints "A->m(1)". #79

Open

Description

@blacktrs

Summary

getTraceAsString omits call arguments in frames: "A->m()" where php prints "A->m(1)".

Repro

<?php
class A { public function m(int $n) { throw new Exception("x"); } }
function chain(int $n) { (new A)->m($n); }
try { chain(7); } catch (Exception $e) { echo $e->getTraceAsString(), "\n"; }

Expected (php)

#0 /Users/taras/var/projects/manticore-hot/tests/aot/repro/wrong/trace_frame_args_missing.php(4): A->m(7)
#1 /Users/taras/var/projects/manticore-hot/tests/aot/repro/wrong/trace_frame_args_missing.php(5): chain(7)
#2 {main}

Actual (manticore 3bea722c, Darwin arm64)

#0 tests/aot/repro/wrong/trace_frame_args_missing.php(4): A->m()
#1 tests/aot/repro/wrong/trace_frame_args_missing.php(5): chain()
#2 {main}

Tracking

Known-bug repro: tests/aot/repro/wrong/trace_frame_args_missing.php — bash tests/aot/xfail.sh -k trace_frame_args_missing 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 5, 2026
  2. added
    needs-design
    area:runtime
    on Oct 13, 2026
  3. blacktrs commented on Oct 13, 2026

    @blacktrs
    ContributorAuthor

    Scope: needs per-frame argument capture. Trace frames store only a name and a line in a ring, with no argument storage, so getTraceAsString/getTrace()['args'] cannot show call args. Needs: a per-frame arg capture (cost on every call; probably opt-in/lazy), plus GC-safe retention of captured values. Note: the repro's .expected hardcodes /Users/taras/var/projects/manticore-hot/... paths, so it needs a .sed sidecar (path normalisation) when promoted. Found in batch B (branch fix/batch-b); skipped.

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

    area:runtimebugneeds-designwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions