Bug #80370 [Opn->Ver]: getAttributes segfault on dynamic properties

From: Date: Sun, 15 Nov 2020 01:31:51 +0000
Subject: Bug #80370 [Opn->Ver]: getAttributes segfault on dynamic properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230357@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80370&edit=1 ID: 80370 Updated by: requinix@php.net Reported by: gmblar+php at gmail dot com Summary: getAttributes segfault on dynamic properties -Status: Open +Status: Verified Type: Bug Package: Reflection related Operating System: Docker PHP Version: 8.0.0RC4 Block user comment: N Private report: N New Comment: ReflectionProperty::getAttributes (ext/reflection/php_reflection.c:5468) reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, ref->prop->attributes, 0, ref->prop->ce, ZEND_ATTRIBUTE_TARGET_PROPERTY); ref->prop is NULL. Previous Comments: ------------------------------------------------------------------------ [2020-11-15 00:43:00] gmblar+php at gmail dot com Description: ------------ getAttributes segfault on dynamic properties Test script: --------------- class Foobar { } $foobar = new Foobar(); $foobar->bar = 42; $reflectionObject = new ReflectionObject($foobar); $reflectionProperty = $reflectionObject->getProperty('bar'); $reflectionProperty->getAttributes(); Expected result: ---------------- Nothing Actual result: -------------- AH00052: child pid 40 exit signal Segmentation fault (11) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80370&edit=1

« previous php.bugs (#230357) next »