RFR: 8366363: MemBaseline accesses VMT without using lock
    Casper Norrbin 
    cnorrbin at openjdk.org
       
    Mon Sep  1 12:27:43 UTC 2025
    
    
  
On Fri, 29 Aug 2025 19:02:16 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Hi,
>> 
>> The `MemBaseline` used to access the VMT instance directly without a lock. We fix that, and we switch from using a `LinkedList` to a copied `RegionsTree` instead.
>
> 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");`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27003#discussion_r2313812719
    
    
More information about the hotspot-runtime-dev
mailing list