RFR: 8272107: Removal of Unsafe::defineAnonymousClass left a dangling C++ class [v2]
Ioi Lam
iklam at openjdk.java.net
Wed Aug 11 19:59:25 UTC 2021
On Wed, 11 Aug 2021 19:26:15 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
>> src/hotspot/share/memory/metaspaceClosure.hpp line 132:
>>
>>> 130: address obj() const {
>>> 131: // In some rare cases we store some flags in the lowest 2 bits of a
>>> 132: // MetaspaceObj pointer. Unmask these when manipulating the pointer.
>>
>> I think `FLAG_MASK` and `flag_bits()` can be removed completely. It was used only for handling the CPSlot during CDS dump. I added the following and all CDS tests passed.
>>
>>
>> uintx p = (uintx)*mpp();
>> + assert((p & FLAG_MASK) == 0, "must be");
>> return (address)(p & (~FLAG_MASK));
>>
>>
>> If you want, I can do the removal in a separate PR.
>
> I like the idea of doing this as a separate PR.
I created https://bugs.openjdk.java.net/browse/JDK-8272343.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5070
More information about the hotspot-dev
mailing list