RFR (XXS): 8246557: test_os_linux.cpp uses NULL instead of MAP_FAILED to check for failed mmap call

Stefan Karlsson stefan.karlsson at oracle.com
Thu Jun 4 11:26:35 UTC 2020


Looks good.

StefanK

On 2020-06-04 12:15, Thomas Schatzl wrote:
> Hi all,
>
>   can I have reviews for this (trivial?) change that fixes wrong 
> detection logic for the mmap calls in the test_os_linux gtests?
>
> Instead of
>
>    ASSERT_TRUE(mapping != NULL) << " mmap failed, mapping_size = " << 
> mapping_size;
>
> it should use
>
>    ASSERT_TRUE(mapping != MAP_FAILED) << " mmap failed, mapping_size = 
> " << mapping_size;
>
> since MAP_FAILED = (void*)-1.
>
> All other uses of mmap seem to be okay.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8246557
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8246557/webrev/
> Testing:
> hs-tier1
>
> Thanks,
>   Thomas




More information about the hotspot-gc-dev mailing list