--- old/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadOnOffTest.java 2018-01-25 21:26:59.634131271 -0800 +++ new/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadOnOffTest.java 2018-01-25 21:26:59.370132276 -0800 @@ -74,7 +74,7 @@ class Allocator implements Runnable { private int depth; - private int g_tmp[]; + private volatile int tmp[]; public Allocator(int depth) { this.depth = depth; @@ -84,10 +84,10 @@ int sum = 0; // Let us assume that the array is 24 bytes of memory. for (int i = 0; i < 127000 / 6; i++) { - int tmp[] = new int[1]; + int newTmp[] = new int[1]; // Force it to be kept. - g_tmp = tmp; - sum += g_tmp[0]; + tmp = newTmp; + sum += tmp[0]; } return sum; }