Code review request 6858865: Fix for 6728376 causes regression if the size of "data" is 0 and malloc returns Null for 0-length

Xueming Shen xueming.shen at oracle.com
Fri Nov 19 07:32:52 UTC 2010


Alan,

It might not be a real "regression" if only consider the supported platforms
(and yes, the malloc manpageI can found does clearly indicate NULL is 
for error).
However I prefer to add some checks to make sure it behaves the same
(compared to before the #6728376 change went it), even on the "weird OS"
that Mario has. Anyway, a 0-length really malloc should not trigger a OOME.

http://cr.openjdk.java.net/~sherman/6858865/webrev

The webrev for #6728376 is at
http://cr.openjdk.java.net/~sherman/6728376/webrev

Thanks,
-Sherman





More information about the core-libs-dev mailing list