On Wed, 20 Nov 2024 03:42:57 GMT, David Holmes <[email protected]> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Reduce test, fix bug in verifier, move and add comments to
>> is_eligible_for_verification.
>
> test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java
> line 96:
>
>> 94: throw new RuntimeException("This should throw VerifyError");
>> 95: } catch (VerifyError e) {
>> 96: // JVMTI recreates the VerifyError so the verification
>> message is lost.
>
> I'm not clear why JVMTI would mess with the `VerifyError` that the verifier
> should have raised, and which explains the reason why verification failed.
> Not that your changes impact that.
The JVMTI code for redefinition returns JVMTI_ERROR_FAILS_VERIFICATION and not
the pending exception to the caller. The agent eventually in
java.instrument/share/native/libinstrument/JavaExceptions.c will recreate the
VerifyError based on the JVMTI error code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22116#discussion_r1850265592