Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234508

VM_HeapWalkOperation::iterate_over_object reads non-strong fields with an on-strong load barrier

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b27

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stefank Stefan Karlsson
                Reporter:
                stefank Stefan Karlsson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: