Round 2 RFR (S) 6424123: JVM crashes on failed 'strdup' call.

Zhengyu Gu zhengyu.gu at oracle.com
Fri Jun 6 17:05:47 UTC 2014


Updated webrev introduces a new DuplicateString() function, that handles 
OOM, similar to AllocateHeap(), and replaces the call sites that do not 
check NULL pointer with this DuplicateString().

http://cr.openjdk.java.net/~zgu/6424123/webrev.01/

Thanks,

-Zhengyu



On 6/4/2014 4:32 PM, Zhengyu Gu wrote:
> JVM should avoid C library's strdup() and use os::strdup() instead. 
> os::strdup() handles OOM, so can avoid JVM crash.
>
> Also, made limited scope of code cleanup, which makes memory ownership 
> more explicit, so they can be claimed by object's destructors.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-6424123
> Webrev: http://cr.openjdk.java.net/~zgu/6424123/webrev.00/
>
> Tests:
>   - JPRT
>   - vm.quick.testlist on Linux x64.
>
> Thanks,
>
> -Zhengyu



More information about the hotspot-runtime-dev mailing list