RFR: 8306767: Concurrent repacking of extra data in MethodData is potentially unsafe
Tom Rodriguez
never at openjdk.org
Tue Nov 28 16:26:06 UTC 2023
On Tue, 28 Nov 2023 06:23:29 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> I'm making sure that `allocate_bci_to_data` is only called when holding the `extra_data_lock`, so that no concurrent calls of it can ever occur.
>
> Testing: tier1-3 and stress.
src/hotspot/share/runtime/deoptimization.cpp line 2499:
> 2497: // This will let us detect a repeated trap at this point.
> 2498: {
> 2499: MutexLocker ml(trap_mdo->extra_data_lock());
Doesn't the lock have to be held over the lifetime of the pdata variable? Otherwise an intervening safepoint could repack the MDO rendering pdata invalid.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16840#discussion_r1408043075
More information about the hotspot-dev
mailing list