RFR: 8366363: MemBaseline accesses VMT without using lock

Johan Sjölen jsjolen at openjdk.org
Mon Sep 1 13:15:45 UTC 2025


On Mon, 1 Sep 2025 12:25:25 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

>> src/hotspot/share/utilities/rbTree.hpp line 454:
>> 
>>> 452: public:
>>> 453:   RBTree() : BaseType(), _allocator() {}
>>> 454:   RBTree(const RBTree& other) : BaseType(), _allocator() {
>> 
>> @caspernorrbin , I added this. Does it look correct?
>
> Looks correct to me, as long as the value type can also be properly copy-constructible. Maybe we can add in an assert to avoid potential future misuse? :-)
> 
> Something like:
> `assert(std::is_copy_constructible<V>(), "Value type must be copy-constructible");`

Yeah, we can do that! I'll put it in a static_assert even.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27003#discussion_r2313930488


More information about the hotspot-dev mailing list