I added some verification code to check that we never apply on-strong load barriers to non-strong fields.
The verification triggered at this point:
// an object references a class and its instance fields
// (static fields are ignored here as we report these as
// references from the class).
inline bool VM_HeapWalkOperation::iterate_over_object(oop o) {
// reference to the class
if (!CallbackInvoker::report_class_reference(o, o->klass()->java_mirror())) {
return false;
}
// iterate over instance fields
ClassFieldMap* field_map = JvmtiCachedClassFieldMap::get_map_of_instance_fields(o);
for (int i=0; i<field_map->field_count(); i++) {
ClassFieldDescriptor* field = field_map->field_at(i);
char type = field->field_type();
if (!is_primitive_field_type(type)) {
oop fld_o = o->obj_field(field->field_offset()); <<< Here