Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT assertion when running php-parser tests #12509

Closed
danog opened this issue Oct 24, 2023 · 1 comment
Closed

JIT assertion when running php-parser tests #12509

danog opened this issue Oct 24, 2023 · 1 comment

Comments

@danog
Copy link
Contributor

danog commented Oct 24, 2023

Description

Reproducer 6 at https://github.com/danog/jit_bugs

.........................php: /php-src/Zend/zend_hash.c:820: zval *_zend_hash_add_or_update_i(HashTable *, zend_string *, zval *, uint32_t): Assertion `(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' failed.

Ping @dstogov

PHP Version

PHP-8.3 or 3fb685b

Operating System

No response

@dstogov
Copy link
Member

dstogov commented Oct 24, 2023

JIT make assumption about inferred refcount == 1, but PHPParser generates error that captures back-trace and saves it in a global variable. As result refcount is incremented and late we have an assertion because our assumption is wrong.

I don't see a simple fix yet...

dstogov added a commit that referenced this issue Oct 26, 2023
* PHP-8.1:
  Fixed GH-12509: JIT assertion when running php-parser tests
dstogov added a commit that referenced this issue Oct 26, 2023
* PHP-8.2:
  Fixed GH-12509: JIT assertion when running php-parser tests
dstogov added a commit that referenced this issue Oct 26, 2023
* PHP-8.3:
  Fixed GH-12509: JIT assertion when running php-parser tests
iluuu1994 added a commit to iluuu1994/php-src that referenced this issue Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants