Skip to content
Permalink
Browse files
8277342: vmTestbase/nsk/stress/strace/strace004.java fails with SIGSE…
…GV in InstanceKlass::jni_id_for

Backport-of: 09e8c8c64abf4178a042c79b92d7e08e54467331
  • Loading branch information
zhengyu123 committed Jan 5, 2022
1 parent de11e6b commit be7343dfc9dfc02f41d9e21f066cb6f5eed1be42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
@@ -1839,29 +1839,18 @@ 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) {
/* jni_id_for for jfieldIds only */
JNIid* InstanceKlass::jni_id_for(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
// 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) {
JNIid* probe = jni_ids() == NULL ? NULL : jni_ids()->find(offset);
if (probe == NULL) {
probe = jni_id_for_impl(offset);
}
return probe;
}

u2 InstanceKlass::enclosing_method_data(int offset) const {
const Array<jushort>* const inner_class_list = inner_classes();
if (inner_class_list == NULL) {
@@ -1300,8 +1300,6 @@ class InstanceKlass: public Klass {
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);

// Returns the array class for the n'th dimension
Klass* array_klass_impl(bool or_null, int n, TRAPS);

1 comment on commit be7343d

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on be7343d Jan 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.