|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80916 Assertion failure with function JIT
Submitted: 2021-03-29 20:03 UTC Modified: 2021-03-29 20:51 UTC
From: derkontrollfreak+9hy5l at gmail dot com Assigned:
Status: Closed Package: JIT
PHP Version: 8.0.4RC1 OS: Debian 10.9 x86_64
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: derkontrollfreak+9hy5l at gmail dot com
New email:
PHP Version: OS:


 [2021-03-29 20:03 UTC] derkontrollfreak+9hy5l at gmail dot com
PHP 8.0.4RC1 (cli) ( NTS DEBUG ) crashes when running the test script with function JIT enabled.

I also tested with PHP 8.1.0-dev (master-Git-2021-03-29) which does not seem to have this bug. It shows the expected result.

Configure Command
./configure --prefix=/dev/shm/test/php-8.0.4RC1 --disable-all --enable-debug --enable-opcache --enable-opcache-jit

php -d zend_extension=opcache -d opcache.enable_cli=on -d opcache.jit_buffer_size=64M -d opcache.jit=function test.php

Test script:

class Test
    public $test = null;

    function test()
        var_dump($this->test . number_format(0));

(new Test())->test();

Expected result:
string(1) "0"

Actual result:
php: /dev/shm/test/php-src/Zend/zend_variables.c:65: zend_string_destroy: Assertion `zend_gc_refcount(&(str)->gc) == 0' failed.

#0  0x00007f1f99ad27bb in raise () from /lib/x86_64-linux-gnu/
#1  0x00007f1f99abd535 in abort () from /lib/x86_64-linux-gnu/
#2  0x00007f1f99abd40f in ?? () from /lib/x86_64-linux-gnu/
#3  0x00007f1f99acb102 in __assert_fail () from /lib/x86_64-linux-gnu/
#4  0x00005593b5b38145 in zend_string_destroy (str=0x7f1f99858680)
    at /dev/shm/test/php-src/Zend/zend_variables.c:65
#5  0x00005593b5b3809f in rc_dtor_func (p=0x7f1f99858680)
    at /dev/shm/test/php-src/Zend/zend_variables.c:57
#6  0x00000000485b83c6 in ?? ()
#7  0x00007f1f998592a0 in ?? ()
#8  0x00007f1f99814020 in ?? ()
#9  0x0000000000000000 in ?? ()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-29 20:51 UTC] derkontrollfreak+9hy5l at gmail dot com
-Status: Open +Status: Closed
 [2021-03-29 20:51 UTC] derkontrollfreak+9hy5l at gmail dot com
Sorry, I just realized the bug has already been fixed in the current PHP-8.0 branch.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat May 08 11:01:23 2021 UTC