|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80370 getAttributes segfault on dynamic properties
Submitted: 2020-11-15 00:43 UTC Modified: 2020-11-15 07:32 UTC
From: gmblar+php at gmail dot com Assigned: beberlei (profile)
Status: Closed Package: Reflection related
PHP Version: 8.0.0RC4 OS: Docker
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gmblar+php at gmail dot com
New email:
PHP Version: OS:


 [2020-11-15 00:43 UTC] gmblar+php at gmail dot com
getAttributes segfault on dynamic properties

Test script:
class Foobar {


$foobar = new Foobar();
$foobar->bar = 42;

$reflectionObject = new ReflectionObject($foobar);
$reflectionProperty = $reflectionObject->getProperty('bar');

Expected result:

Actual result:
AH00052: child pid 40 exit signal Segmentation fault (11)


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-15 01:31 UTC]
-Status: Open +Status: Verified
 [2020-11-15 01:31 UTC]
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 07:32 UTC]
-Assigned To: +Assigned To: beberlei
 [2020-11-15 07:49 UTC]
The following pull request has been associated:

Patch Name: Fixed bug #80370: Segmentation fault on ReflectionProperty::getAttrib…
On GitHub:
 [2020-11-17 09:54 UTC]
Automatic comment on behalf of
Log: Fixed bug #80370: Segmentation fault reflecting attributes of dynamic property
 [2020-11-17 09:54 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 09:01:30 2024 UTC