php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79475 [JIT] func_get_args() assertion violation
Submitted: 2020-04-14 13:02 UTC Modified: 2020-04-17 07:55 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: opcache
PHP Version: master-Git-2020-04-14 (Git) OS: Windows
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: cmb@php.net
New email:
PHP Version: OS:

 

 [2020-04-14 13:02 UTC] cmb@php.net
Description:
------------
If JIT is enabled, trying to add an element to the array returned
by func_get_args() triggers an assertion vialotion[1], because the
array's refcount is 2.

[1] <https://github.com/php/php-src/blob/master/Zend/zend_hash.c#L965>


Test script:
---------------
<?php
function foo() {
    $args = func_get_args();
    $args[] = "bar";
}
foo();
?>


Actual result:
--------------
Assertion failed: (zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6)), file Zend\zend_hash.c, line 965


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-04-17 07:53 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a1eaaa692e91fa28ee1ba050150547cd1317be87
Log: Fix #79475: [JIT] func_get_args() assertion violation
 [2020-04-17 07:53 UTC] cmb@php.net
-Status: Open +Status: Closed
 [2020-04-17 07:55 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC