8141213: [Parfait]Potentially blocking function GetArrayLength called in JNI critical region at line 239 of jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c in function GET_ARRAYS
Reviewed-by: prr, serb
--- a/jdk/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c Mon Oct 26 23:41:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c Tue Nov 03 14:44:10 2015 +0300
@@ -234,9 +234,9 @@
}
if (src->hOutputBuffer) {
assert(src->outbuf.ip == 0);
+ src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer);
src->outbuf.ip = (int *)(*env)->GetPrimitiveArrayCritical
(env, src->hOutputBuffer, 0);
- src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer);
if (src->outbuf.ip == 0) {
RELEASE_ARRAYS(env, src);
return 0;