RFR: 8358815: Exception event spec has stale reference to catch_klass parameter

Serguei Spitsyn sspitsyn at openjdk.org
Tue Jun 10 21:15:28 UTC 2025


On Tue, 10 Jun 2025 19:35:16 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> src/hotspot/share/prims/jvmti.xml line 12874:
>> 
>>> 12872:       be reset by one of those native methods.
>>> 12873:       Similarly, exceptions that are reported as uncaught (<code>catch_method</code>
>>> 12874:       and <code>catch_location</code> set to 0) may in fact be caught by native code.
>> 
>> catch_method is a jmethodID so null if uncaught.
>
> Then you also need to fix:
> 
> "If there is no such catch clause, each field is set to 0."
> 
> Also, technically speaking, can't `catch_location` be 0 even if caught (caught first the bytecode of the method)? Although I doubt  javac would ever generate such code, it seems it is allowed. If so, then `catch_method == null` is the only check  a user should make.

Thank you for the comments!
Yes, I've also come to the same conclusion about the only `catch_method == null` check.

> Then you also need to fix:
> "If there is no such catch clause, each field is set to 0."

Good catch, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25710#discussion_r2138777360


More information about the hotspot-dev mailing list