mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 05:59:52 +00:00
8277342: vmTestbase/nsk/stress/strace/strace004.java fails with SIGSEGV in InstanceKlass::jni_id_for
Reviewed-by: dholmes, hseigel
This commit is contained in:
parent
976c2bb056
commit
09e8c8c64a
@ -2061,25 +2061,14 @@ Method* InstanceKlass::lookup_method_in_all_interfaces(Symbol* name,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* jni_id_for_impl for jfieldIds only */
|
||||
JNIid* InstanceKlass::jni_id_for_impl(int offset) {
|
||||
MutexLocker ml(JfieldIdCreation_lock);
|
||||
// Retry lookup after we got the lock
|
||||
JNIid* probe = jni_ids() == NULL ? NULL : jni_ids()->find(offset);
|
||||
if (probe == NULL) {
|
||||
// Slow case, allocate new static field identifier
|
||||
probe = new JNIid(this, offset, jni_ids());
|
||||
set_jni_ids(probe);
|
||||
}
|
||||
return probe;
|
||||
}
|
||||
|
||||
|
||||
/* jni_id_for for jfieldIds only */
|
||||
JNIid* InstanceKlass::jni_id_for(int offset) {
|
||||
MutexLocker ml(JfieldIdCreation_lock);
|
||||
JNIid* probe = jni_ids() == NULL ? NULL : jni_ids()->find(offset);
|
||||
if (probe == NULL) {
|
||||
probe = jni_id_for_impl(offset);
|
||||
// Allocate new static field identifier
|
||||
probe = new JNIid(this, offset, jni_ids());
|
||||
set_jni_ids(probe);
|
||||
}
|
||||
return probe;
|
||||
}
|
||||
|
||||
@ -1199,8 +1199,6 @@ private:
|
||||
void initialize_impl (TRAPS);
|
||||
void initialize_super_interfaces (TRAPS);
|
||||
void eager_initialize_impl ();
|
||||
/* jni_id_for_impl for jfieldID only */
|
||||
JNIid* jni_id_for_impl (int offset);
|
||||
|
||||
void add_initialization_error(JavaThread* current, Handle exception);
|
||||
oop get_initialization_error(JavaThread* current);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user