RFR (XXS): 8246557: test_os_linux.cpp uses NULL instead of MAP_FAILED to check for failed mmap call
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jun 4 10:15:26 UTC 2020
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