Skip to content

$k[A] = $k[B] = v aborts: the outer store uses the array buffer fetched before the inner store reallocated it #190

Closed

Description

@blacktrs

Summary

$k[A] = $k[B] = v aborts: the outer store uses the array buffer fetched before the inner store reallocated it.

Repro

<?php
function g(string $n): array
{
    $k = [];
    $k["x" . $n] = $k[$n] = [$n];
    return $k;
}
$r = g("a");
echo count($r), ' ', json_encode($r), "\n";

Expected (php)

2 {"a":["a"],"xa":["a"]}

Actual (manticore c432667f, Darwin arm64)


[exit code 133]

Tracking

Known-bug repro: tests/aot/repro/crash/chained_array_element_assign_same_array.php — bash tests/aot/xfail.sh -k chained_array_element_assign_same_array 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
  2. added a commit that references this issue on Oct 14, 2026
    7d042a5
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