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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: 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
       }
       

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

              Created:
              Updated:
              Resolved: