Skip to content

ownflow verifier rejects a loop-carried local assigned from an untyped array element and from new #338

Closed

Description

@blacktrs

Summary

ownflow verifier rejects a loop-carried local assigned from an untyped array element and from new.

Repro

<?php
class M {
    public static function opt(array $cs)
    {
        $left = $cs[0];
        $merged = [];
        for ($i = 1; $i < 3; $i++) {
            $right = $cs[$i];
            if ($left instanceof self && $right instanceof self) {
                $left = new M();
            } else {
                $merged[] = $left;
                $left = $right;
            }
        }
        $merged[] = $left;
        return $merged;
    }
}

Expected (php)

Actual (manticore fe5476b4, Darwin arm64)

compile failed (rc=65):
compile failed: MIR.verify: ownflow: $left read at line 17 in M__opt past a representation mismatch (obj vs 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_loop_cell_obj_merge.php — bash tests/aot/xfail.sh -k ownflow_loop_cell_obj_merge 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 18, 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