6419370: 4/4 new jmethodID code has tiny holes in synchronization

Fix races in jmethodID cache and JNI itable index cache.

Reviewed-by: ikrylov, acorn
This commit is contained in:
Daniel D. Daugherty 2009-09-21 09:30:24 -06:00
parent 9ed976194b
commit 2a4f284029
4 changed files with 204 additions and 53 deletions

View file

@ -555,7 +555,7 @@ class methodOopDesc : public oopDesc {
// Get this method's jmethodID -- allocate if it doesn't exist
jmethodID jmethod_id() { methodHandle this_h(this);
return instanceKlass::jmethod_id_for_impl(method_holder(), this_h); }
return instanceKlass::get_jmethod_id(method_holder(), this_h); }
// Lookup the jmethodID for this method. Return NULL if not found.
// NOTE that this function can be called from a signal handler