You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does work if we disable JIT. Sorry that I don't have a reproducer. I will try to send it later.
PHP Version
PHP 8.4.19 (cli) (built: Mar 12 2026 23:41:32) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.4.19, Copyright (c) Zend Technologies
with Zend OPcache v8.4.19, Copyright (c), by Zend Technologies
with Xdebug v3.5.0, Copyright (c) 2002-2025, by Derick Rethans
Operating System
No response
Reacted by Davy Goossens, Enjoyzz, Samuel Nogueira, Jonathan H. Wage, Jay Knight, Dennis Væversted and ysakaki
I am getting the same thing running psalm in github actions with 8.4.19 as well as a segfault when running phpunit tests. It doesn't happen in 8.4.18 but started happening in 8.4.19
I merged a fix that manages to bypass the attribute-specific issue in vimeo/psalm@69763af
However, there are still several other JIT bugs that make psalm unusable with JIT right now, as can be reproduced by simply running psalm on the master branch without JIT (no issues) an with JIT (via --force-jit, a bunch of issues).
Activity
ndossche commentedon Mar 16, 2026
Can you try with the fix linked from #21395 ?
githrdw commentedon Mar 16, 2026
I have tried to build PHP with the patched IR in JIT, but I still get this error 🤔
githrdw commentedon Mar 16, 2026
@ndossche when JIT is enabled, passing an if-shorthand referencing to Attribute constants returns not the expected value somehow.
See:
vimeo/psalm#11723 (comment)
jwage commentedon Mar 16, 2026
I am getting the same thing running psalm in github actions with 8.4.19 as well as a segfault when running phpunit tests. It doesn't happen in 8.4.18 but started happening in 8.4.19
jorgsowa commentedon Mar 16, 2026
@ndossche, it's merged to master, but it doesn't resolve. I will try to find a minimal reproducer for the issue.
danog commentedon Mar 17, 2026
I merged a fix that manages to bypass the attribute-specific issue in vimeo/psalm@69763af
However, there are still several other JIT bugs that make psalm unusable with JIT right now, as can be reproduced by simply running psalm on the master branch without JIT (no issues) an with JIT (via --force-jit, a bunch of issues).
Disable JIT when running Psalm to work around vimeo/psalm#11723
Disable JIT when running Psalm to work around vimeo/psalm#11723
arnaud-lb commentedon Mar 25, 2026
First bad commit reproducing vimeo/psalm#11723: dd9421d.
First bad commit in dstogov/ir: dstogov/ir@802947c
Simplified reproducer:
SatoshiFujinaga commentedon Mar 31, 2026
I'm experiencing the same issue with PHPStan + nikic/php-parser's
NodeTraverser.Environment
Symptom
NodeTraverser::traverseNode()has aninstanceofguard that is bypassed by JIT:Error:
The
intvalue is aflagsproperty (e.g.,ClassMethod::$flags = 2) which should be filtered by theinstanceofguard.Verification
php -d opcache.jit=0 vendor/bin/phpstan analyse→ works correctly, no errorsThis matches the same COND instruction optimization bug identified in this issue.
arnaud-lb commentedon Apr 3, 2026
This should be fixed in PHP-8.4, 8.5, master now.
Could you confirm?
jorgsowa commentedon Apr 3, 2026
I checked on master with an buggy version of Psalm, and I confirm that the bug has been fixed for me. Thank you
NEWS
arnaud-lb commentedon Apr 8, 2026
Thank you @jorgsowa!