RFR: 8306767: Concurrent repacking of extra data in MethodData is potentially unsafe
Tom Rodriguez
never at openjdk.org
Tue Nov 28 18:00:06 UTC 2023
On Tue, 28 Nov 2023 17:20:47 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Good point. That was done in a similar place above but not here.
>
> Hmm. So is it that I just have to have a lock on `allocate_bci_to_data`, or do I have to protect `pdata`? Because `pdata` is returned from `Deoptimization::query_update_method_data`, and so I would have to make the lock take a wider scope than that function, right?
The lock needs to be held while accessing the contents of pdata which is very complicated in this particular usage pattern. Maybe the caller needs to refetch the pointer under a lock instead of passing it out of this method.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16840#discussion_r1408165429
More information about the hotspot-dev
mailing list