RFR: 8365407: Race condition in MethodTrainingData::verify() [v2]

David Holmes dholmes at openjdk.org
Thu Aug 21 02:24:53 UTC 2025


On Thu, 21 Aug 2025 02:01:26 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Igor Veresov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix minimal build
>
> src/hotspot/share/compiler/compilationPolicy.cpp line 142:
> 
>> 140: 
>> 141:  void CompilationPolicy::flush_replay_training_at_init(TRAPS) {
>> 142:     MonitorLocker locker(THREAD, TrainingReplayQueue_lock);
> 
> There is no exception processing here so this method should not be declared to take `TRAPS`. If you want to pass the current thread just declare a `JavaThread* current` parameter directly please.

Hmmm I see this code is full of incorrect TRAPS usage!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26866#discussion_r2289686080


More information about the hotspot-dev mailing list