[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Integrated: 8276696: ParallelObjectIterator freed at the wrong time in VM_HeapDumper
From: Erik =?UTF-8?B?w5ZzdGVybHVuZA==?= <eosterlund () openjdk ! java ! net>
Date: 2021-11-23 14:38:15
Message-ID: RU1WUNJVx1eqBs8mKDW0CaW5HtJGn7sFG7noGQsCAIQ=.538901b5-02a8-4bbf-896b-fa70b7424abf () github ! com
[Download RAW message or body]
On Mon, 22 Nov 2021 13:49:02 GMT, Erik Ă–sterlund <eosterlund@openjdk.org> wrote:
> The VM_HeapDumper code uses a C heap allocated ParallelObjectIterator. It is \
> constructed right before running a parallel operation with a work gang, but freed \
> in the destructor of the VM_HeapDumper. This means it is created on one thread and \
> deleted on another thread. This becomes a bit problematic when a parallel object \
> iterator implementation uses a ThreadsListHandle (which is indeed the case for \
> ZGC). This patch changes ParallelObjectIterator to be a StackObj, carrying a \
> ParallelObjectIteratorImpl object, which is never exposed publicly. This ensures \
> that construction and destruction of the internal object iterator is scoped like \
> RAII objects, hence complying with how ThreadsListHandle is supposed to be used.
This pull request has now been integrated.
Changeset: f4dc03ea
Author: Erik Ă–sterlund <eosterlund@openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/f4dc03ea6de327425ff265c3d2ec16ea7b0e1634
Stats: 70 lines in 15 files changed: 35 ins; 11 del; 24 mod
8276696: ParallelObjectIterator freed at the wrong time in VM_HeapDumper
Reviewed-by: pliden, stefank
-------------
PR: https://git.openjdk.java.net/jdk/pull/6501
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic