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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 9
    • hotspot
    • None
    • gc

      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
       }
       

            Unassigned Unassigned
            twisti Christian Thalinger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: