Bug #79475 [NEW]: [JIT] func_get_args() assertion violation

From: Date: Tue, 14 Apr 2020 13:02:02 +0000
Subject: Bug #79475 [NEW]: [JIT] func_get_args() assertion violation
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226571@lists.php.net to get a copy of this message
From:             cmb
Operating system: Windows
PHP version:      master-Git-2020-04-14 (Git)
Package:          opcache
Bug Type:         Bug
Bug description:[JIT] func_get_args() assertion violation

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 bug report at https://bugs.php.net/bug.php?id=79475&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79475&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79475&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79475&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79475&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79475&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79475&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79475&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79475&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79475&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79475&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79475&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79475&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79475&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79475&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79475&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79475&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79475&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#226571) next »