RFR: 8267341: macos attempt_reserve_memory_at(arg1, arg2, true) failure [v6]
David Holmes
dholmes at openjdk.java.net
Mon Jan 17 05:21:23 UTC 2022
On Mon, 10 Jan 2022 16:21:01 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Re-enable **release_multi_mappings** gtest on macOS
>>
>> This test would occasionally fail on macOS, but thanks to Dan's catch, it turned out that it actually only fails on those test machines that run macOS 10.13.6 or earlier.
>>
>> The proposed fix simply makes a single call to `os::reserve_memory()` with the `executable` flag `True`, and if that failed forces `executable` to `False` later in the actual test code (alternatively we could have just also skipped that test portion completely, but this way we actually do something rather than nothing at all).
>>
>> Tested manually on macOS 10.13.6 and via Mach5
>
> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>
> add nice comment for the workaround implementation
Looks good. Two minor nits.
Thanks,
David
test/hotspot/gtest/runtime/test_os.cpp line 357:
> 355: // Not all macOS versions can use os::reserve_memory (i.e. anon_mmap) API
> 356: // to reserve executable memory, so before attempting to use it,
> 357: // we need to verify that we can do so by asking for a tiny exectuable
typo: exectuable -> executable
test/hotspot/gtest/runtime/test_os.cpp line 358:
> 356: // to reserve executable memory, so before attempting to use it,
> 357: // we need to verify that we can do so by asking for a tiny exectuable
> 358: // memory chunk
Period at end of sentence please.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6960
More information about the hotspot-runtime-dev
mailing list