RFR(xxxs) (jdk10): 8168542: os::realloc should return a valid pointer for input size=0

Thomas Stüfe thomas.stuefe at gmail.com
Sat Feb 4 12:09:23 UTC 2017


Hi guys,

picking up this trivial issue which got pushed to jdk10, could I please
have a re-review? Oh, also a sponsor.

Issue:
https://bugs.openjdk.java.net/browse/JDK-8168542

webrev:
http://cr.openjdk.java.net/~stuefe/webrevs/8168542-os_realloc_size_0/jdk10-webrev.01/webrev/

For reference, the old discussion back in october 16:
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-October/021675.html

The webrev is unchanged from the proposal for jdk9, just rebased to
jdk10/hs.

@Chris, I decided to not follow your suggestion to move the comparison into
the #ifndef assert. You are right, this is redundant with the check inside
os::malloc(), but as you said, checking at the entry of os::realloc() makes
it clearer.

Thank you!

Kind Regards, Thomas


More information about the hotspot-runtime-dev mailing list