php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70873 Regression on private static properties access
Submitted: 2015-11-06 20:19 UTC Modified: 2015-11-06 20:20 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: marcio@php.net Assigned: bwoebi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0.0RC6 OS:
Private report: No CVE-ID: None
 [2015-11-06 20:19 UTC] marcio@php.net
Description:
------------
It seems that since PHP7 alpha it's possible to access private static properties of upper classes. This is an unwanted regression https://3v4l.org/4XheY

Currently on master, the same example has a failing assertion and a segfault:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
php: php/Zend/zend_object_handlers.c:279: zend_verify_property_access: Assertion `property_info->flags & 0x200' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff5ea5877 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);

Expected result:
----------------
Same error as php 5.6: Fatal error: Cannot access property B::$x in /in/4XheY on line 9

Actual result:
--------------
On RC6 it's possible to access the private static property from the upper class.
On master it causes a segfault.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-06 20:20 UTC] marcio@php.net
-Assigned To: +Assigned To: bwoebi
 [2015-11-07 14:51 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2d8d97cee25b632b21d4740c0c7c077196603e9d
Log: Fixed bug #70873 (Regression on private static properties access)
 [2015-11-07 14:51 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2015-11-09 18:12 UTC] ab@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=10cd3b69f835d03af340f1b8d78e878820033d17
Log: Fixed bug #70873 (Regression on private static properties access)
 [2016-07-20 11:35 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2d8d97cee25b632b21d4740c0c7c077196603e9d
Log: Fixed bug #70873 (Regression on private static properties access)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC