Skip to content

Disable JIT on Apple Silicon + ZTS #13396

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

Closed

Conversation

iluuu1994
Copy link
Member

@iluuu1994 iluuu1994 commented Feb 15, 2024

See discussion in #13351.

This will be merged into PHP 8.2. This PR targets master to test the change, as only the master branch currently includes testing for Apple Silicon.

iluuu1994 added a commit to iluuu1994/php-src that referenced this pull request Feb 15, 2024
@iluuu1994 iluuu1994 force-pushed the disable-jit-on-apple-silicon-zts branch from 69e5ebe to 637f1cc Compare February 15, 2024 09:33
@iluuu1994 iluuu1994 force-pushed the disable-jit-on-apple-silicon-zts branch from 637f1cc to 881fe21 Compare February 15, 2024 09:40
@iluuu1994 iluuu1994 marked this pull request as ready for review February 15, 2024 10:56
@iluuu1994 iluuu1994 removed the request for review from TimWolla February 15, 2024 10:56
Co-authored-by: Peter Kokot <peterkokot@gmail.com>
Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JIT disabling looks right.

The push workflow runs "Tracing JIT" tests even when JIT is disabled.
Probably nightly workflow will do the same.

@iluuu1994
Copy link
Member Author

iluuu1994 commented Feb 15, 2024

@dstogov Good point. I don't plan on merging the CI changes from this PR. However, I will make the changes to nightly on master as you suggested.

@iluuu1994 iluuu1994 closed this in 6db9551 Feb 17, 2024
ramsey pushed a commit that referenced this pull request Jul 3, 2025
Apple Silicon has stricter rules about rwx mmap regions. They need to be created
using the MAP_JIT flag. However, the MAP_JIT seems to be incompatible with
MAP_SHARED. ZTS requires MAP_SHARED so that some threads may execute code from a
page while another writes/appends to it. We did not find another solution, other
than completely disabling JIT for Apple Silicon + ZTS.

See discussion in #13351.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
Fixes GH-13400
Closes GH-13396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants