-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b39
-
generic
-
generic
-
Verified
###@###.### 2004-02-11
Extension of JVM_ACC_WRITTEN_FLAGS with ENUM flag (fix of the bug 4992284)
shifted the JVM_ACC_FIELD_ACCESS_WATCHED bit inside of the mask
JVM_ACC_WRITTEN_FLAGS.
It cases some problems in jvmti code.
prims/jvmtiRedefineClasses.cpp:
if ((old_flags ^ new_flags) & JVM_ACC_WRITTEN_FLAGS) {
return JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED;
}
The JVM_ACC_WRITTEN_FLAGS is supposed to mask watchpoints in the old_flags.
Now it does not mask the bit JVM_ACC_FIELD_ACCESS_WATCHED because now became
a part of JVM_ACC_WRITTEN_FLAGS.
The follwoing can be problems as well:
prims/jvm.cpp:
(1)
JVM_QUICK_ENTRY(jint, JVM_GetFieldIxModifiers(JNIEnv *env, jclass cls, int field_index))
JVMWrapper("JVM_GetFieldIxModifiers");
klassOop k = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(cls));
typeArrayOop fields = instanceKlass::cast(k)->fields();
return fields->ushort_at(field_index * instanceKlass::next_offset +
instanceKlass::access_flags_offset) & JVM_ACC_WRITTEN_FLAGS;
JVM_END
(2)
JVM_QUICK_ENTRY(jint, JVM_GetCPFieldModifiers(JNIEnv *env, jclass cls, int cp_index, jclass called_cls))
...
return fields->ushort_at(i + instanceKlass::access_flags_offset) & JVM_ACC_WRITTEN_FLAGS;
...
}
The code above intentionally masks the field watchpoints.
-Serguei
###@###.### 2004-02-13
This bug affects the following NSK tests:
nsk/jvmdi/RedefineClasses/redefclass027
nsk/jvmti/RedefineClasses/redefclass027
- relates to
-
JDK-4992284 ACC_ANNOTATION and ACC_ENUM bits not exposed properly
-
- Closed
-