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

-ZapUnusedHeapArea triggers: assert(top() == NULL || *(intptr_t*)top() != 0, "overzeroing detected")

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • gc
    • inapplicable

      It's difficult to trigger the assert but it happens for me every now and then when using -ZapUnusedHeapArea. The fix seems to be pretty obvious:

      diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memory/threadLocalAllocBuffer.cpp
      --- a/src/share/vm/memory/threadLocalAllocBuffer.cpp
      +++ b/src/share/vm/memory/threadLocalAllocBuffer.cpp
      @@ -42,7 +42,7 @@
         _slow_refill_waste += (unsigned)remaining();
         // In debug mode we expect the storage above top to be uninitialized
         // or filled with a padding object.
      - assert(top() == NULL || *(intptr_t*)top() != 0, "overzeroing detected");
      + assert(!ZapUnusedHeapArea || top() == NULL || *(intptr_t*)top() != 0, "overzeroing detected");
         make_parsable(true); // also retire the TLAB
       }
       

            eosterlund Erik Ă–sterlund
            twisti Christian Thalinger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: