Skip to content

ReflectionProperty::setValue on a property with a set hook segfaults. #169

Closed

Description

@blacktrs

Summary

ReflectionProperty::setValue on a property with a set hook segfaults.

Repro

<?php
class Box {
    public string $name = 'init' {
        set { echo "hook(", $value, ")\n"; $this->name = strtoupper($value); }
    }
}
$b = new Box();
$n = new ReflectionProperty(Box::class, 'name');
$n->setValue($b, 'via setValue');
echo $b->name, "\n";

Expected (php)

hook(via setValue)
VIA SETVALUE

Actual (manticore ced5f468, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

Known-bug repro: tests/aot/repro/crash/reflection_set_value_hooked_property.php — bash tests/aot/xfail.sh -k reflection_set_value_hooked_property 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 10, 2026
  2. added a commit that references this issue on Oct 10, 2026
    9dd39f1
  3. added a commit that references this issue on Oct 16, 2026
    7f2be54
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