-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
primitives seem to be passed via reference instead of by value under some conditions when JIT is enabled on windows #11917
Comments
What happens if you enable opcache and only disable JIT? I suspect the real issue might be in the JIT instead of opcache. |
@nielsdos - good call. The following php.ini does not demonstrate the problem:
I've updated my post accordingly. |
Same thing with 8.1.23 on Win11, had to force jit off with
|
Me too, on Win 10 with 8.2 |
I can't reproduce the problem on 8.1.26-dev |
@dstogov the issue is still present on windows after rebasing on the latest PHP-8.1: https://github.com/php/php-src/actions/runs/6535551162/job/17745266902?pr=12269 |
@dstogov I can only reproduce it on Windows, not Linux. Reproduces with danog@d788e4f reliably. Bug only occurs when using tracing JIT with optimization level >= 2. Register allocation settings in JIT don't have an influence. |
… of by value under some conditions when JIT is enabled on windows
… of by value under some conditions when JIT is enabled on windows (php#12451)
Description
The following code:
With this php.ini:
Resulted in this output:
But I expected this output instead:
I get the expected output when I set opcache.enable to 0 in the php.ini but not when it's set to 1.
Note that sometimes I need to run the PHP file twice before the issue starts appearing. Also, this appears to only be a problem on Windows as I was unable to duplicate the issue with https://github.com/phpseclib/docker-php/tree/8.2jit
PHP Version
PHP 8.2.9
Operating System
Windows 11
The text was updated successfully, but these errors were encountered: