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

@Contended fields can overrun oop maps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • hs25
    • hotspot
    • None

      Found with code review.

      The space allocated to store the temporal info about the oop maps is allocated to fit the non-contended oops only. Should any @Contended oop emerge, it will overrun the array and corrupt something else.

      unsigned int nonstatic_oop_count = fac->count[NONSTATIC_OOP] - fac_contended.count[NONSTATIC_OOP];
      ...
      int* nonstatic_oop_offsets;
      nonstatic_oop_offsets = NEW_RESOURCE_ARRAY_IN_THREAD(
                  THREAD, int, nonstatic_oop_count + 1);

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: