php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78950 Assertion failure when preloading trait method with static variables
Submitted: 2019-12-12 09:34 UTC Modified: -
From: nikic@php.net Assigned:
Status: Closed Package: opcache
PHP Version: 7.4.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 + 38 = ?
Subscribe to this entry?

 
 [2019-12-12 09:34 UTC] nikic@php.net
Description:
------------
<?php
trait Foo {
    public function test() {
        static $bar;
    }
}
class Bar {
    use Foo;
}

Causes:

php: /home/nikic/php-7.4/ext/opcache/zend_persist.c:300: zend_persist_op_array_ex: Assertion `op_array->static_variables != ((void *)0)' failed.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-12-12 10:52 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=be89a5c7f191b319c11b3b487a1366e20a1fdc17
Log: Fixed bug #78950: Preloading trait method with static variables
 [2019-12-12 10:52 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 03:01:29 2024 UTC