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

add assert to ThreadLocalAllocBuffer::clear_before_allocation to check the storage above top

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc

      Description

      This is a patch that came out of JVMCI.

      --- old/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp 2015-09-24 08:37:21.000000000 -1000
      +++ new/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp 2015-09-24 08:37:21.000000000 -1000
      @@ -40,6 +40,9 @@
       
       void ThreadLocalAllocBuffer::clear_before_allocation() {
         _slow_refill_waste += (unsigned)remaining();
      + // In debug mode we expect the storage above top to be uninitialized
      + // or filled with a padding object.
      + assert(!ZapUnusedHeapArea || VM_Version::reserve_for_allocation_prefetch() > 0 || top() == NULL || *(intptr_t*)top() != 0, "overzeroing detected");
         make_parsable(true); // also retire the TLAB
       }
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              twisti Christian Thalinger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: