From a4d318c92cf0aaf86fa6ce131ea593c99f3e4d3a Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Fri, 17 Apr 2020 10:09:06 -0700 Subject: [PATCH] 8242787: sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java fails with sun.jvm.hotspot.types.WrongTypeException Reviewed-by: amenkov, sspitsyn, iklam --- .../classes/sun/jvm/hotspot/oops/ObjectHeap.java | 14 ++------------ test/jdk/ProblemList.txt | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java index c2c1f7c7439..29d6c6593ff 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java @@ -244,13 +244,7 @@ public class ObjectHeap { while (handle.lessThan(top)) { Oop obj = null; - try { - obj = newOop(handle); - } catch (UnknownOopException exp) { - if (DEBUG) { - throw new RuntimeException(" UnknownOopException " + exp); - } - } + obj = newOop(handle); if (obj == null) { throw new UnknownOopException(); } @@ -263,11 +257,7 @@ public class ObjectHeap { handle = handle.addOffsetToAsOopHandle(obj.getObjectSize()); } - } - catch (AddressException e) { - // This is okay at the top of these regions - } - catch (UnknownOopException e) { + } catch (AddressException | UnknownOopException | WrongTypeException e) { // This is okay at the top of these regions } } diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index edbdb614f56..294fbd9fc2a 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -940,7 +940,7 @@ java/util/ServiceLoader/ReloadTest.java 8242935 generic-all # svc_tools sun/tools/jhsdb/BasicLauncherTest.java 8211767 linux-ppc64,linux-ppc64le -sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8231634,8242787 generic-all +sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8231634,8242789 generic-all ############################################################################