On Thu, 12 Mar 2026 09:34:59 GMT, Dean Long <[email protected]> wrote:

>> src/hotspot/share/oops/generateOopMap.cpp line 1201:
>> 
>>> 1199:       case Bytecodes::_aload_0:
>>> 1200:         // These bytecodes can trap for rewriting.  We need to assume 
>>> that
>>> 1201:         // they do not throw exceptions to make the monitor analysis 
>>> work.
>> 
>> I don't know what this means.  Could the first instruction in an exception 
>> handler be an aload_0?  In which case we want it to be in the exception 
>> range.
>
> The case where aload_0 is the first instruction in a handler would be covered 
> by exception_can_trap(), right?

Yes, aload_0 can trap so it'll get to this switch statement.  But if we find an 
aload_0, it'll return and not create an exception edge to any containing 
handlers.  This claims so the monitor analysis works, but honestly no idea why.

I commented out this entire switch statement looking for some test case where 
something unexpected would happen but there were no test failures.

It seems like this return here is wrong (?)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30171#discussion_r2955223892

Reply via email to