With the porting of the JDK to macOS/AArch64 (JEP-391), the JVM codebase has received numerous patches aimed at addressing the write-xor-execute (W^X) policy issue. Currently, the approach to handling this problem involves a trial-and-error method, where the ThreadWX guard is set at each entry point where the JVM crashes. At times, it is even simpler to disable a specific feature (JDK-8311636) than to resolve the issue.
An alternative approach could involve dynamically switching the W^X thread mode as needed. At Azul, we have conducted some tests and found no performance degradation.
An alternative approach could involve dynamically switching the W^X thread mode as needed. At Azul, we have conducted some tests and found no performance degradation.
- duplicates
-
JDK-8330171 Lazy W^X switch implementation
- Closed