[8u] RFR(xs): 8068042: Check jdk/src/share/native/sun/misc/URLClassPath.c for JNI pending exception
Jiangli Zhou
jiangli.zhou at oracle.com
Tue Dec 1 02:10:10 UTC 2015
Hi Calvin,
I see getUTF() throws OutOfMemoryError if malloc fails before returning NULL. Do you know if there is any case that getUTF() returns NULL without throwing any exception? The usage of getUTF() and exception handling don’t seem to be consistent in existing idk code. Some places check the NULL return value without throwing a new exception, while the other places throws a new OOM without checking for pending exception (like the code you are fixing). Maybe the callee does not need to re-throw the exception for the NULL return value case, and you can add a comment saying “an OutOfMemoryError” has already been thrown by getUTF()?
Thanks,
Jiangli
> On Nov 30, 2015, at 5:13 PM, Calvin Cheung <calvin.cheung at oracle.com> wrote:
>
> Please review this small fix for adding the check for JNI pending exception in URLClassPath.c.
>
> This fix is only for jdk8u and isn't applicable to 9.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8068042
> (unfortunately it is a closed bug)
>
> webrev: http://cr.openjdk.java.net/~ccheung/8068042_8u/webrev.00/
>
> Tests:
> JPRT with -testset hotspot
> RBT hotspot/test/:hotspot_all,vm.regression.testlist, vm.quick
>
> thanks,
> Calvin
More information about the hotspot-runtime-dev
mailing list