# HG changeset patch # User vadim # Date 1446551050 -10800 # Node ID 8508354e76e12ab8c480cce83cccea9fdad375dd # Parent 924c479304a50c8e35079dae6d8d377d2c2b82e5 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 diff -r 924c479304a5 -r 8508354e76e1 jdk/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c --- 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;