RFR: 8310275: Bug in assignment operator of ReservedMemoryRegion [v2]
Ralf Schmelter
rschmelter at openjdk.org
Wed Jul 26 08:30:43 UTC 2023
On Wed, 26 Jul 2023 07:10:21 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Sorry but how can a thread not detaching before exiting cause our buggy RMR assignment operator to be called??
In the VirtualMemoryTracker::add_reserved_region() method we detect that a newly registered reserved region if overlapping with an already existing reserved region. If that already existing region has type mtThreadStack we assume that the thread ended without notifying the virtual memory tracker and fix this by assigning the new reserved region to the old one. And that is where the assignment operator is called (see https://github.com/openjdk/jdk/blob/e9daf4a0185b90762d2bdd38d86fe93b4822ea08/src/hotspot/share/services/virtualMemoryTracker.cpp#L373).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14440#issuecomment-1651219793
More information about the hotspot-runtime-dev
mailing list