Skip to content

ownflow verifier rejects a [[]]-seeded accumulator rebound from a cell-element array (Laravel Arr::crossJoin) #373

Closed

Description

@blacktrs

Summary

ownflow verifier rejects a [[]]-seeded accumulator rebound from a cell-element array (Laravel Arr::crossJoin).

Repro

<?php
class Arr {
    /** @return array<int, array<array-key, mixed>> */
    public static function crossJoin(...$arrays)
    {
        $results = [[]];
        foreach ($arrays as $index => $array) {
            $append = [];
            foreach ($results as $product) {
                foreach ($array as $item) {
                    $product[$index] = $item;
                    $append[] = $product;
                }
            }
            $results = $append;
        }
        return $results;
    }
}
echo json_encode(Arr::crossJoin([1, 2], ['a', 'b'])), "\n";

Expected (php)

[[1,"a"],[1,"b"],[2,"a"],[2,"b"]]

Actual (manticore fe5476b4, Darwin arm64)

compile failed (rc=65):
compile failed: MIR.verify: ownflow: $results read at line 18 in Arr__crossJoin past a representation mismatch (arr:arr:unknown vs arr:arr:cell): the name is live there
compile: front-end (parse/typeck/IR) returned null (rc=65)

Tracking

Known-bug repro: tests/aot/repro/crash/ownflow_nested_accumulator_rebind.php — bash tests/aot/xfail.sh -k ownflow_nested_accumulator_rebind 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 20, 2026
  2. added a commit that references this issue on Nov 8, 2026
    cac708f
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