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

[8u] GenericTaskQueue destructor is incorrect

XMLWordPrintable

    • gc
    • b04

      This is on behalf of <wattsun@tencent.com>.

      -----------------------------------
      When do some g1 gc improvement in jdk8u, we found a potential bug in class GenericTaskQueue.

      Memory allocated by _array_allocator [1] in class GenericTaskQueue will be freed when ~GenericTaskQueue [2] is called.

      And will be freed again when ~ArrayAllocator [3] called again due to free_in_destructor = true.
       
      [1] http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/002b9c947f0f/src/share/vm/utilities/taskqueue.hpp#l259
      [2] http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/002b9c947f0f/src/share/vm/utilities/taskqueue.hpp#l432
      [3] http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/002b9c947f0f/src/share/vm/memory/allocation.hpp#l736
      -----------------------------------

            phh Paul Hohensee
            jiefu Jie Fu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: