[aarch64-port-dev ] RFR: 8253816: Switch to Exec W^X mode after JNI DetachCurrentThread

Anton Kozlov akozlov at openjdk.java.net
Thu Dec 17 12:35:25 UTC 2020


On Tue, 15 Dec 2020 19:02:31 GMT, Bernhard Urban-Forster <burban at openjdk.org> wrote:

>> JVM leaves Writeable mode for W^X after JNI detach thread. #9 describes an example when this breaks application expectations: a thread returns to a code generated by the application after JNI detach and crashes. Since the default mode is Executable, the change to Writeable is implicit and not expected.
>> 
>> The proposed solution is to ensure Executable mode after JNI detach.
>
> Looks good to me. Thanks for providing a test case.

@lewurm Thank you for review! Could you push this change? I had to squash it manually, as Skara is not aware of aarch64-port project.

-------------

PR: https://git.openjdk.java.net/aarch64-port/pull/10


More information about the aarch64-port-dev mailing list