8213565: Crash in DependencyContext::remove_dependent_nmethod

Reviewed-by: rehn, kvn
This commit is contained in:
Erik Österlund 2018-11-30 11:40:48 +01:00
parent a2bbc9c091
commit 3a5bccf5c6
18 changed files with 320 additions and 213 deletions

View file

@ -69,6 +69,7 @@ class fieldDescriptor;
class jniIdMapBase;
class JNIid;
class JvmtiCachedClassFieldMap;
class nmethodBucket;
class SuperTypeClosure;
// This is used in iterators below.
@ -249,7 +250,8 @@ class InstanceKlass: public Klass {
OopMapCache* volatile _oop_map_cache; // OopMapCache for all methods in the klass (allocated lazily)
JNIid* _jni_ids; // First JNI identifier for static fields in this class
jmethodID* volatile _methods_jmethod_ids; // jmethodIDs corresponding to method_idnum, or NULL if none
intptr_t _dep_context; // packed DependencyContext structure
nmethodBucket* volatile _dep_context; // packed DependencyContext structure
uint64_t volatile _dep_context_last_cleaned;
nmethod* _osr_nmethods_head; // Head of list of on-stack replacement nmethods for this class
#if INCLUDE_JVMTI
BreakpointInfo* _breakpoints; // bpt lists, managed by Method*
@ -976,7 +978,8 @@ public:
inline DependencyContext dependencies();
int mark_dependent_nmethods(KlassDepChange& changes);
void add_dependent_nmethod(nmethod* nm);
void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);
void remove_dependent_nmethod(nmethod* nm);
void clean_dependency_context();
// On-stack replacement support
nmethod* osr_nmethods_head() const { return _osr_nmethods_head; };