-
Notifications
You must be signed in to change notification settings - Fork 396
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
AArch64 macOS: Add a call to pthread_jit_write_protect_np() #6551
Conversation
Jenkins build aarch64 |
There is no other place that call |
|
||
#if defined(OSX) | ||
// Regain permission for writing to the code buffer | ||
// after calling methodTrampolineLookup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you amend this comment to include why this is the case? i.e., that methodTrampolineLookup()
may call createTrampoline()
which will acquire/release write protection leaving the write permission disabled in this path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the comment.
This commit adds a call to pthread_jit_write_protect_np(0) in ARM64ImmSymInstruction::generateBinaryEncoding() for AArch64 macOS. It is needed because methodTrampolineLookup() calls createTrampoline() when necessary, and that makes the compiler thread lose the permission for writing to the code buffer. Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
Jenkins build aarch64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a comment was changed. No need to wait for CI. Merging.
This commit adds a call to pthread_jit_write_protect_np(0) in ARM64ImmSymInstruction::generateBinaryEncoding() for AArch64 macOS. Original PR in OMR: eclipse-omr/omr#6551 Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
This commit adds a call to pthread_jit_write_protect_np(0) in
ARM64ImmSymInstruction::generateBinaryEncoding() for AArch64 macOS.
It is needed because methodTrampolineLookup() calls createTrampoline()
when necessary, and that makes the compiler thread lose the permission
for writing to the code buffer.
Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com