Skip to content

A property read through an erased receiver, narrowed by instanceof, is dereferenced as a raw pointer while still a tagged cell (SIGSEGV). #459

Closed

Description

@blacktrs

Summary

A property read through an erased receiver, narrowed by instanceof, is dereferenced as a raw pointer while still a tagged cell (SIGSEGV).

Repro

<?php
class Node {}
class IntConst extends Node { public function __construct(public int $value) {} }
class Arm { public function __construct(public ?Node $value) {} }
class Other { public string $value = 'x'; }
function f(array $arms): void
{
    $seen = [];
    foreach ($arms as $arm) {
        if ($arm->value instanceof IntConst && !isset($seen[$arm->value->value])) {
            $seen[$arm->value->value] = true;
            echo $arm->value->value, "\n";
        }
    }
}
f([new Arm(new IntConst(7)), new Arm(null), new Arm(new IntConst(9)), new Other()]);

Expected (php)

7
9

Actual (manticore dc3883d9, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

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