RFR: 8253447: Remove buggy code introduced by 8249451 [v2]

David Holmes dholmes at openjdk.java.net
Tue Sep 22 02:37:56 UTC 2020


On Tue, 22 Sep 2020 02:05:01 GMT, Jamsheed Mohammed C M <jcm at openjdk.org> wrote:

>> if ((thread->has_pending_exception() || thread->frames_to_pop_failed_realloc() > 0) && exec_mode !=
>> Unpack_uncommon_trap) {
>>     assert(thread->has_pending_exception(), "should have thrown OOME/Async");
>> 
>> introduced a buggy code checking, clearing pending exception and taking Unpack_exception route.
>> 
>> This can have consequences as the deopt entries may have additional logic depending on bci's. and the change introduced
>> in 8249451 doesn't honor deopt exception checking and forward logic. Thank you @fisk  for pointing the bug in the code.
>> Request for review.
>
> Jamsheed Mohammed C M has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixing the assert message too

src/hotspot/share/runtime/deoptimization.cpp line 531:

> 529: #endif
> 530:
> 531:   if (thread->frames_to_pop_failed_realloc() > 0 && exec_mode != Unpack_uncommon_trap) {

I'm not at all clear on whether an async-exception could be pending at this point. The original change indicated it
could be, but now you are saying it can't. How is that known?

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

PR: https://git.openjdk.java.net/jdk/pull/292


More information about the hotspot-runtime-dev mailing list