RFR: 8262952: [macos_aarch64] os::commit_memory failure [v2]
Gerard Ziemski
gziemski at openjdk.java.net
Tue May 11 16:05:24 UTC 2021
> On x86_64 macOS the following sequence works just fine:
>
> attempt_reserve_memory_at(executable=false)
> commit_memory(executable=true)
>
> however, on aarch64 macOS it fails. The way to get "commit_memory(executable=true)" to work is to make the memory chunk executable right from the start at the time we reserve it.
>
> Please note, that:
>
> attempt_reserve_memory_at(executable=true)
> commit_memory(executable=false)
>
> works, so we can always downgrade memory by removing its "executable" privilege at the time we commit it some time later.
>
> Passes Mach5 hs-tier1,2,3,4,5 tests
Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
do not expose memory with exec priviledges unless explicitly asked for, fix the test intead to ask for exececutable memory as needed
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/3865/files
- new: https://git.openjdk.java.net/jdk/pull/3865/files/4a9e4a8e..ad3467b4
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3865&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3865&range=00-01
Stats: 5 lines in 2 files changed: 0 ins; 3 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/3865.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3865/head:pull/3865
PR: https://git.openjdk.java.net/jdk/pull/3865
More information about the hotspot-runtime-dev
mailing list