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

From: Date: Tue, 17 Nov 2020 09:54:55 +0000
Subject: Bug #80370 [Ver->Csd]: getAttributes segfault on dynamic properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230401@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: nikic@php.net Reported by: gmblar+php at gmail dot com Summary: getAttributes segfault on dynamic properties -Status: Verified +Status: Closed Type: Bug Package: Reflection related Operating System: Docker PHP Version: 8.0.0RC4 Assigned To: beberlei Block user comment: N Private report: N New Comment: Automatic comment on behalf of kontakt@beberlei.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=1727d96d0e1057ce140682b79d7f121dee0fc370 Log: Fixed bug #80370: Segmentation fault reflecting attributes of dynamic property Previous Comments: ------------------------------------------------------------------------ [2020-11-15 07:49:02] beberlei@php.net The following pull request has been associated: Patch Name: Fixed bug #80370: Segmentation fault on ReflectionProperty::getAttrib… On GitHub: https://github.com/php/php-src/pull/6428 Patch: https://github.com/php/php-src/pull/6428.patch ------------------------------------------------------------------------ [2020-11-15 01:31:51] requinix@php.net 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. ------------------------------------------------------------------------ [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 (#230401) next »