JDK-8208605 : Fix for 8199868 breaks tier1 build
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2018-07-31
  • Updated: 2019-01-04
  • Resolved: 2018-07-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b06Fixed
Related Reports
Relates :  
Description
jib > Creating support/test/hotspot/jtreg/native/bin/ThreadSignalMask from 1 file(s)
jib > "/scratch/opt/mach5/mesos/work_dir/05f7edb3-16fa-4fcb-ac0e-4b60cd625534/workspace/open/test/hotspot/jtreg/gc/epsilon/libCriticalNative.c", line 85: error: declaration can not follow a statement (E_DECLARATION_IN_CODE)
jib > "/scratch/opt/mach5/mesos/work_dir/05f7edb3-16fa-4fcb-ac0e-4b60cd625534/workspace/open/test/hotspot/jtreg/gc/epsilon/libCriticalNative.c", line 93: error: declaration can not follow a statement (E_DECLARATION_IN_CODE)
jib > "/scratch/opt/mach5/mesos/work_dir/05f7edb3-16fa-4fcb-ac0e-4b60cd625534/workspace/open/test/hotspot/jtreg/gc/epsilon/libCriticalNative.c", line 100: error: declaration can not follow a statement (E_DECLARATION_IN_CODE)
jib > cc: acomp failed for /scratch/opt/mach5/mesos/work_dir/05f7edb3-16fa-4fcb-ac0e-4b60cd625534/workspace/open/test/hotspot/jtreg/gc/epsilon/libCriticalNative.c
jib > JtregNativeHotspot.gmk:1508: recipe for target '/scratch/opt/mach5/mesos/work_dir/05f7edb3-16fa-4fcb-ac0e-4b60cd625534/workspace/build/solaris-sparcv9/support/test/hotspot/jtreg/native/support/libCriticalNative/libCriticalNative.o' failed
jib > make[3]: *** [/scratch/opt/mach5/mesos/work_dir/05f7edb3-16fa-4fcb-ac0e-4b60cd625534/workspace/build/solaris-sparcv9/support/test/hotspot/jtreg/native/support/libCriticalNative/libCriticalNative.o] Error 1
jib > make[3]: *** Waiting for unfinished jobs....
jib > make/Main.gmk:475: recipe for target 'build-test-hotspot-jtreg-native' failed
jib > make[2]: *** [build-test-hotspot-jtreg-native] Error 1
jib > make[2]: *** Waiting for unfinished jobs....
jib > 
jib > ERROR: Build failed for target 'default (product-bundles test-bundles)' in configuration 'solaris-sparcv9' (exit code 2) 
jib > Stopping sjavac server
jib > 
Comments
The following fix passes a 'release' build on my Solaris-X64 server: $ hg diff diff -r 4ac20e5f96ce test/hotspot/jtreg/gc/epsilon/libCriticalNative.c --- a/test/hotspot/jtreg/gc/epsilon/libCriticalNative.c Tue Jul 31 14:24:10 2018 -0400 +++ b/test/hotspot/jtreg/gc/epsilon/libCriticalNative.c Tue Jul 31 15:59:51 2018 -0400 @@ -74,30 +74,35 @@ (JNIEnv *env, jclass jclazz, jlong a1, jintArray a2, jintArray a3, jlongArray a4, jintArray a5) { jlong sum = a1; jsize index; - jsize len = (*env)->GetArrayLength(env, a2); - jint* a2_arr = (jint*)(*env)->GetPrimitiveArrayCritical(env, a2, 0); + jsize len; + jint* a2_arr; + jint* a3_arr; + jlong* a4_arr; + jint* a5_arr; + + len = (*env)->GetArrayLength(env, a2); + a2_arr = (jint*)(*env)->GetPrimitiveArrayCritical(env, a2, 0); for (index = 0; index < len; index ++) { sum += a2_arr[index]; } (*env)->ReleasePrimitiveArrayCritical(env, a2, a2_arr, 0); len = (*env)->GetArrayLength(env, a3); - jint* a3_arr = (jint*)(*env)->GetPrimitiveArrayCritical(env, a3, 0); + a3_arr = (jint*)(*env)->GetPrimitiveArrayCritical(env, a3, 0); for (index = 0; index < len; index ++) { sum += a3_arr[index]; } (*env)->ReleasePrimitiveArrayCritical(env, a3, a3_arr, 0); - len = (*env)->GetArrayLength(env, a4); - jlong* a4_arr = (jlong*)(*env)->GetPrimitiveArrayCritical(env, a4, 0); + a4_arr = (jlong*)(*env)->GetPrimitiveArrayCritical(env, a4, 0); for (index = 0; index < len; index ++) { sum += a4_arr[index]; } (*env)->ReleasePrimitiveArrayCritical(env, a4, a4_arr, 0); len = (*env)->GetArrayLength(env, a5); - jint* a5_arr = (jint*)(*env)->GetPrimitiveArrayCritical(env, a5, 0); + a5_arr = (jint*)(*env)->GetPrimitiveArrayCritical(env, a5, 0); for (index = 0; index < len; index ++) { sum += a5_arr[index]; } 'fastdebug' and 'slowdebug' builds on my Solaris-X64 server are in process. I've also submitted the following mach5 job: $ mach5 remote-build-and-test --job builds-tier1,hs-tier1 --email daniel.daugherty@oracle.com
31-07-2018

Trying a build on my Solaris-X64 server... Update: Looking at the new test, I think I see what the studio compiler is unhappy about. After I repro the build failure, I'll make a pass at fixing it.
31-07-2018