41
41
#if INCLUDE_CDS_JAVA_HEAP
42
42
43
43
// 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,
45
49
// Foo.get.test()
46
50
// correctly returns true when CDS disabled, but incorrectly returns false when CDS is enabled,
47
51
// because the archived archivedFoo.bar value is different than Bar.bar.
@@ -133,6 +137,12 @@ CDSHeapVerifier::CDSHeapVerifier() : _archived_objs(0), _problems(0)
133
137
ADD_EXCL (" java/lang/invoke/InvokerBytecodeGenerator" , " MEMBERNAME_FACTORY" , // D
134
138
" CD_Object_array" , // E same as <...>ConstantUtils.CD_Object_array::CD_Object
135
139
" 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
+
136
146
}
137
147
138
148
# undef ADD_EXCL
@@ -145,6 +155,7 @@ CDSHeapVerifier::~CDSHeapVerifier() {
145
155
log_error (cds, heap)(" Scanned %d objects. Found %d case(s) where "
146
156
" an object points to a static field that "
147
157
" may hold a different value at runtime." , _archived_objs, _problems);
158
+ log_error (cds, heap)(" Please see cdsHeapVerifier.cpp and aotClassInitializer.cpp for details" );
148
159
MetaspaceShared::unrecoverable_writing_error ();
149
160
}
150
161
}
0 commit comments