Skip to content

$o->arr[] = yield 1; emits invalid IR #19

Closed

Description

@blacktrs

Summary

$o->arr[] = yield 1; emits invalid IR.

Repro

<?php
final class O { public array $arr = []; }
function g(O $o): \Generator { $o->arr[] = yield 1; }
$o = new O();
$g = g($o);
$g->current();
$g->send('v');
echo json_encode($o->arr), "\n";

Expected (php 8.5)

["v"]

Actual (manticore 10affa68, macOS arm64)

compile failed (rc=75):
error: invalid LLVM IR input: Instruction does not dominate all uses!
  %r32 = call ptr @__mir_array_cow(ptr %r31)
  %r46 = call i64 @__mir_elem_encode(ptr %r32, i64 %r45)
Instruction does not dominate all uses!
  %r32 = call ptr @__mir_array_cow(ptr %r31)
  %r38 = call ptr @__mir_array_append(ptr %r32, i64 %r46)
1 error generated.
assemble: clang -c failed (rc=256); IR at /tmp/manticore_<pid>.ll

Tracking

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