Skip to content

Commit 15d36ee

Browse files
committed
8353330: Test runtime/cds/appcds/SignedJar.java fails in CDSHeapVerifier
Reviewed-by: vlivanov, dholmes, liach
1 parent e6fe249 commit 15d36ee

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/hotspot/share/cds/cdsHeapVerifier.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
#if INCLUDE_CDS_JAVA_HEAP
4242

4343
// CDSHeapVerifier is used to check for problems where an archived object references a
44-
// static field that may be get a different value at runtime. In the following example,
44+
// static field that may be get a different value at runtime.
45+
//
46+
// *Please see comments in aotClassInitializer.cpp for how to avoid such problems*,
47+
//
48+
// In the following example,
4549
// Foo.get.test()
4650
// correctly returns true when CDS disabled, but incorrectly returns false when CDS is enabled,
4751
// because the archived archivedFoo.bar value is different than Bar.bar.
@@ -133,6 +137,12 @@ CDSHeapVerifier::CDSHeapVerifier() : _archived_objs(0), _problems(0)
133137
ADD_EXCL("java/lang/invoke/InvokerBytecodeGenerator", "MEMBERNAME_FACTORY", // D
134138
"CD_Object_array", // E same as <...>ConstantUtils.CD_Object_array::CD_Object
135139
"INVOKER_SUPER_DESC"); // E same as java.lang.constant.ConstantDescs::CD_Object
140+
141+
ADD_EXCL("java/lang/invoke/MethodHandleImpl$ArrayAccessor",
142+
"OBJECT_ARRAY_GETTER", // D
143+
"OBJECT_ARRAY_SETTER", // D
144+
"OBJECT_ARRAY_LENGTH"); // D
145+
136146
}
137147

138148
# undef ADD_EXCL
@@ -145,6 +155,7 @@ CDSHeapVerifier::~CDSHeapVerifier() {
145155
log_error(cds, heap)("Scanned %d objects. Found %d case(s) where "
146156
"an object points to a static field that "
147157
"may hold a different value at runtime.", _archived_objs, _problems);
158+
log_error(cds, heap)("Please see cdsHeapVerifier.cpp and aotClassInitializer.cpp for details");
148159
MetaspaceShared::unrecoverable_writing_error();
149160
}
150161
}

test/hotspot/jtreg/ProblemList.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ gc/shenandoah/TestEvilSyncBug.java#generational 8345501 generic-all
103103

104104
# :hotspot_runtime
105105

106-
runtime/cds/appcds/SignedJar.java 8353330 generic-all
107-
108106
runtime/jni/terminatedThread/TestTerminatedThread.java 8317789 aix-ppc64
109107
runtime/handshake/HandshakeSuspendExitTest.java 8294313 generic-all
110108
runtime/Monitor/SyncOnValueBasedClassTest.java 8340995 linux-s390x

0 commit comments

Comments
 (0)