php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: derkontrollfreak+9hy5l at gmail dot com
New email:
PHP Version: OS:

 

 [2021-03-29 20:03 UTC] derkontrollfreak+9hy5l at gmail dot com
Description:
------------
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

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


Test script:
---------------
<?php

class Test
{
    public $test = null;

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

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


Expected result:
----------------
STDOUT
======
string(1) "0"


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

Backtrace
=========
#0  0x00007f1f99ad27bb in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f1f99abd535 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f1f99abd40f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007f1f99acb102 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#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 ?? ()


Patches

Pull Requests

History

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 18:01:30 2024 UTC