RFR: 8330606: Redefinition doesn't but should verify the new klass [v3]

Coleen Phillimore coleenp at openjdk.org
Wed Nov 20 12:58:30 UTC 2024


On Wed, 20 Nov 2024 12:23:09 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/oops/method.cpp line 339:
>> 
>>> 337: int Method::validate_bci(int bci) const {
>>> 338:   // Called from the verifier, and should return -1 if not valid.
>>> 339:   return ((is_native() && bci == 0) || (!is_native() && 0 <= bci && bci < code_size())) ? bci : -1;
>> 
>> This expansion seems more correct, but it also seems unrelated to the main changes.
>
> This expansion was the fix to a bug that I hit while testing the main change.

I removed all the code for the VerifyError <init> code to reduce the test case, so the failing BCI was 0 and the verifier reporting tested whether this was a valid bytecode, then asserted a couple lines further that it wasn't a valid bytecode.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22116#discussion_r1850270304


More information about the serviceability-dev mailing list