RFR: 8318982: Improve Exceptions::special_exception [v2]

Doug Simon dnsimon at openjdk.org
Wed Nov 1 08:52:01 UTC 2023


On Wed, 1 Nov 2023 02:20:04 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Good point: https://github.com/openjdk/jdk/pull/16401/commits/f74fa5ee688558db5917dd2951ced3786410b7fe
>
> Duplicate messages are just a bug waiting to be filed IMO.

They are not as bad as no message at all which is what motivates this change in the first place. I can change the special exception log message so it stands out as not just a duplicate. For example:

[0.185s][info][exceptions] Thread cannot call Java so instead of throwing exception <java/lang/IncompatibleClassChangeError: Found interface java.util.Set, but class was expected> (0x0000000000000000)
at [src/hotspot/share/interpreter/linkResolver.cpp, line 735]
for thread 0x000000013e025400,
throwing pre-allocated exception: a 'java/lang/VirtualMachineError'{0x0000000772e06f00}


Also note that the duplication only happens on the path where an Exception object exists. Based on inspection and experience, this is rarely (never?) taken as the thread is normally in a state where it cannot actually instantiate an exception (e.g., `can_call_java` is false).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16401#discussion_r1378533291


More information about the hotspot-dev mailing list