Skip to content

f($this->$name) into an array &$x parameter segfaults #201

Closed

Description

@blacktrs

Summary

f($this->$name) into an array &$x parameter segfaults.

Repro

<?php
final class B
{
    public array $a = [1 => [1]];

    public function g(string $n): void { self::f($this->$n); }

    public static function f(array &$x): void { $x[9] = [6]; }
}
$o = new B();
$o->g('a');
echo json_encode($o->a), "\n";

Expected (php)

{"1":[1],"9":[6]}

Actual (manticore f871d84d, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

Known-bug repro: tests/aot/repro/crash/dynamic_property_as_by_ref_argument.php — bash tests/aot/xfail.sh -k dynamic_property_as_by_ref_argument 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 Oct 11, 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