Bug #70873 [NEW]: Regression on private static properties access
From: marcio
Operating system:
PHP version: 7.0.0RC6
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Regression on private static properties access
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.
--
Edit bug report at https://bugs.php.net/bug.php?id=70873&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70873&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70873&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70873&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70873&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70873&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70873&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70873&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70873&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70873&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70873&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70873&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70873&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70873&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70873&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70873&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70873&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70873&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70873&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70873&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70873&r=mysqlcfg
Thread (2 messages)
- marcio@php.net