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
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:
10 + 1 = ?
Subscribe to this entry?

 
 [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: Wed Dec 11 16:01:28 2024 UTC