RFR: 8358815: Exception event spec has stale reference to catch_klass parameter
Chris Plummer
cjplummer at openjdk.org
Tue Jun 10 19:37:29 UTC 2025
On Tue, 10 Jun 2025 11:03:42 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> The JVMTI Exception event callback spec refers to the `catch_klass` parameter which does not exist anymore. Instead the Exception event callback spec should refer to the `catch_method` and `catch_location` parameters.
>> I treat this as a bug and doubt we need a CSR for this issue.
>>
>> Testing: N/A
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25710#discussion_r2138638748
More information about the hotspot-dev
mailing list