RFR: 8306767: Concurrent repacking of extra data in MethodData is potentially unsafe [v18]

Emanuel Peter epeter at openjdk.org
Wed Jan 17 15:51:57 UTC 2024


On Wed, 17 Jan 2024 15:07:31 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Looks good to me. Thanks for making the changes. Do we want to file a bug to refactor the code?
>
>> @rwestrel thanks for the review! I pushed a comment improvement.
>> 
>> What kind of refactoring are you thinking about? Just to remove the `MutexUnlocker` occurrence, or something bigger?
> 
> I was thinking maybe something along the lines of what Tom suggested: " I think the API would need to make a stronger split between preallocated records and records which might come from the extra data section. "
> It doesn't seem right that the API can return a pointer to something that's not safe to access unless we own a lock too.

@rwestrel Ok, makes sense. Would you want to do this?
I mostly addressed this because it is a bug, but otherwise I have my focus elsewhere.

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

PR Comment: https://git.openjdk.org/jdk/pull/16840#issuecomment-1896089600


More information about the hotspot-dev mailing list