--- old/src/hotspot/share/classfile/moduleEntry.hpp 2020-06-23 12:35:21.655230276 -0700 +++ new/src/hotspot/share/classfile/moduleEntry.hpp 2020-06-23 12:35:21.411221091 -0700 @@ -69,7 +69,7 @@ GrowableArray* _reads; // list of modules that are readable by this module Symbol* _version; // module version number Symbol* _location; // module location - CDS_ONLY(int _shared_path_index;) // >0 if this classes in this module are in CDS archive + CDS_ONLY(int _shared_path_index;) // >=0 if classes in this module are in CDS archive bool _can_read_all_unnamed; bool _has_default_read_edges; // JVMTI redefine/retransform support bool _must_walk_reads; // walk module's reads list at GC safepoints to purge out dead modules @@ -156,6 +156,7 @@ void set_is_patched() { _is_patched = true; + CDS_ONLY(_shared_path_index = -1); // Mark all shared classes in this module invisible. } bool is_patched() { return _is_patched;