--- old/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java 2018-06-08 19:43:39.135732831 +0200 +++ new/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java 2018-06-08 19:43:38.870721333 +0200 @@ -41,6 +41,7 @@ * done * Test is executed for following sublcasses of ObjectReference: StringReference, ThreadReference, ClassLoaderReference * + * @requires vm.gc != "Z" * @library /vmTestbase * /test/lib * @run driver jdk.test.lib.FileInstaller . . @@ -125,6 +126,11 @@ ":" + referrerCount + ":" + referrerType + (referrerType.equals(ObjectInstancesManager.WEAK_REFERENCE) ? "|" + ObjectInstancesManager.STRONG_REFERENCE : "")); + // Note! This test is broken, in the sense that it incorrectly assumes + // that no GC can happen before it walks the heap. In practice, it seems + // to only affect this test when using ZGC. However, this test will also + // fail when using other GCs if an explicit GC is done here. + // the instance counts should not be affected by creating multiple references checkDebugeeAnswer_instanceCounts(className, createInstanceCount, objectsToFilter);