Bug #79475 [Opn->Csd]: [JIT] func_get_args() assertion violation
Edit report at https://bugs.php.net/bug.php?id=79475&edit=1
ID: 79475
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: [JIT] func_get_args() assertion violation
-Status: Open
+Status: Closed
Type: Bug
Package: opcache
Operating System: Windows
PHP Version: master-Git-2020-04-14 (Git)
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2020-04-14 13:02:02] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79475&edit=1
Thread (2 messages)