[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8269537: memset() is called after operator new [v2]
From:       Kim Barrett <kbarrett () openjdk ! java ! net>
Date:       2021-09-26 4:53:07
Message-ID: f6i__6NORGMv0QjAFGbZQTsaFpPn_CK_4Z9BdO12FOA=.576f76d5-806d-451f-b121-765cc7e3cd24 () github ! com
[Download RAW message or body]

On Fri, 24 Sep 2021 08:50:18 GMT, Leo Korinth <lkorinth@openjdk.org> wrote:

> > I hit the new assert when not on Linux, I guess it has to do with the \
> > initialization of the thread local variable.
> 
> Thanks Ioi for making me adding the assert!!! The sequencing of the allocation \
> function and the arguments to the constructor is not what I thought, so my \
> "solution" is not working. I am unsure how to resolve this in a good way. We could \
> probably have a small thread local collection of (type, address) pairs, but I \
> wonder if it is not better removing this debug information altogether. It is to my \
> knowledge only used in GrowableArray (to limit the type of its internal \
> allocations) and to hinder delete on resource allocated objects.

A collection of (type, address) pairs is still problematic.  It still requires \
assuming that the address of the derived object is the same as the address of the \
ResourceObj subobject, which isn't guaranteed, though the current mechanism also \
depends on that being true.  I think there might be other places in HotSpot where \
we're making that assumption too, unfortunately.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5387


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic