php / php-src

The PHP Interpreter
https://www.php.net
Other
38.33k stars 7.76k forks source link

8.4 tracing JIT phpseclib failures #16996

Open danog opened 2 days ago

danog commented 2 days ago

Description

The following phpseclib testsuites fail on x86-64-v4 with tracing JIT only:

Reproducer: https://github.com/danog/jit_bugs, bugs/phpseclib.sh tracing /app/tests/Unit/Crypt/RC2Test.php

ping @dstogov

PHP Version

nightly

Operating System

No response

nielsdos commented 2 days ago

I debugged this for a while and it seems like values from different CVs are ending up into different CVs. I think it's related to spill conflicts of CVs with ZEND_ASSIGN, but it's complicated to understand. Always returning 1 for IS_CV in zend_jit_spilling_may_cause_conflict does prevent the issue, so that hints that it's maybe indeed spill related.