Skip to content

Commit

Permalink
Merge pull request #15907 from knn-k/aarch64macos_jit_protect
Browse files Browse the repository at this point in the history
AArch64 macOS: Re-acquire execution permission in compilation threads
  • Loading branch information
0xdaryl committed Sep 20, 2022
2 parents 2184d05 + c176ae9 commit eddd3a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8201,6 +8201,11 @@ TR::CompilationInfoPerThreadBase::compile(J9VMThread * vmThread,
reloRuntime);
}

#if defined(OSX) && defined(AARCH64)
// Re-acquire execution permission of JIT code cache for this thread
// regardless of the previous protection status
pthread_jit_write_protect_np(1);
#endif

vmThread->omrVMThread->vmState = oldState;
vmThread->jitMethodToBeCompiled = NULL;
Expand Down

0 comments on commit eddd3a5

Please sign in to comment.