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

[GR-36766] Darwin-aarch64: add support for MAP_JIT/pthread_jit_write_protect_np #4286

Merged
merged 2 commits into from
Feb 16, 2022

Conversation

graalvmbot
Copy link
Collaborator

Apple added a new API to interact with runtime generated code, where an additional flag is required to be passed to mmap(2) when executable memory is requested. Furthermore pthread_jit_write_protect_np(3) can be used to toggle the permission of that memory between RW and RX, on a thread-local basis.

More details about this can be found here: https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon

@graalvmbot graalvmbot force-pushed the github/burbanfo/svm-darwin-aarch64-jit branch from 92a634a to d153c07 Compare February 2, 2022 11:10
@graalvmbot graalvmbot force-pushed the github/burbanfo/svm-darwin-aarch64-jit branch 6 times, most recently from f8bbc19 to 442fcd2 Compare February 11, 2022 12:42
@graalvmbot graalvmbot force-pushed the github/burbanfo/svm-darwin-aarch64-jit branch from 442fcd2 to 0439106 Compare February 15, 2022 16:16
@graalvmbot graalvmbot merged commit e9469bd into master Feb 16, 2022
@jperedadnr
Copy link

The article mentions the JIT compiler support is intended for Apple Silicon, so I take it only applies to macOS_AArch64 as I don't think this would work on iOS_AAarch64?

The changes of this PR are applied to DARWIN_AARCH64, but since this PR was merged, however, shouldn't they be applied only to MACOS_AARCH64 platform?

@lewurm
Copy link
Member

lewurm commented Feb 17, 2022

Ha, good catch, thank you! I'll submit a fix.

@graalvmbot graalvmbot deleted the github/burbanfo/svm-darwin-aarch64-jit branch March 24, 2022 04:37
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