Bug #70215 [NEW]: segfault when __invoke is static
| From: | sjon at hortensius dot net | Date: | Sat, 08 Aug 2015 14:00:13 +0000 |
| Subject: | Bug #70215 [NEW]: segfault when __invoke is static | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-195025@lists.php.net to get a copy of this message | ||
From: sjon at hortensius dot net
Operating system: archlinux
PHP version: 7.0.0beta3
Package: Reproducible crash
Bug Type: Bug
Bug description:segfault when __invoke is static
Description:
------------
PHP correctly shows a Warning, but also segfaults when executing the
script. This should be fixed, or the Warning should be updated to a
Fatal instead
7beta3 is the only version that has this problem as can be seen on
http://3v4l.org/C9KDr
Test script:
---------------
<?php
class A {
public static function __invoke()
{
echo __CLASS__;
}
}
class B extends A {
}
$b = new B;
$b();
Expected result:
----------------
Warning: The magic method __invoke() must have public visibility and
cannot be static in /in/C9KDr on line 4
A
Actual result:
--------------
Warning: The magic method __invoke() must have public visibility and
cannot be static in /in/C9KDr on line 4
Process exited with code 139.
--
Edit bug report at https://bugs.php.net/bug.php?id=70215&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70215&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70215&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70215&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70215&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70215&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70215&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70215&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70215&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70215&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70215&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70215&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70215&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70215&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70215&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70215&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70215&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70215&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70215&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70215&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70215&r=mysqlcfg