Mercurial > hg > truffle
comparison src/share/vm/classfile/classFileParser.cpp @ 977:74a5db69c1fe
6419370: 4/4 new jmethodID code has tiny holes in synchronization
Summary: Fix races in jmethodID cache and JNI itable index cache.
Reviewed-by: ikrylov, acorn
author | dcubed |
---|---|
date | Mon, 21 Sep 2009 09:30:24 -0600 |
parents | 83c29a26f67c |
children | 85f13cdfbc1d 2e8bdfdd3ba2 |
comparison
equal
deleted
inserted
replaced
975:83c29a26f67c | 977:74a5db69c1fe |
---|---|
3229 this_klass->set_methods(methods()); | 3229 this_klass->set_methods(methods()); |
3230 if (has_final_method) { | 3230 if (has_final_method) { |
3231 this_klass->set_has_final_method(); | 3231 this_klass->set_has_final_method(); |
3232 } | 3232 } |
3233 this_klass->set_method_ordering(method_ordering()); | 3233 this_klass->set_method_ordering(method_ordering()); |
3234 // The instanceKlass::_methods_jmethod_ids cache and the | |
3235 // instanceKlass::_methods_cached_itable_indices cache are | |
3236 // both managed on the assumption that the initial cache | |
3237 // size is equal to the number of methods in the class. If | |
3238 // that changes, then instanceKlass::idnum_can_increment() | |
3239 // has to be changed accordingly. | |
3234 this_klass->set_initial_method_idnum(methods->length()); | 3240 this_klass->set_initial_method_idnum(methods->length()); |
3235 this_klass->set_name(cp->klass_name_at(this_class_index)); | 3241 this_klass->set_name(cp->klass_name_at(this_class_index)); |
3236 if (LinkWellKnownClasses || is_anonymous()) // I am well known to myself | 3242 if (LinkWellKnownClasses || is_anonymous()) // I am well known to myself |
3237 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve | 3243 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve |
3238 this_klass->set_protection_domain(protection_domain()); | 3244 this_klass->set_protection_domain(protection_domain()); |