diff --git a/src/hotspot/share/classfile/verifier.cpp b/src/hotspot/share/classfile/verifier.cpp index 30f147b9ae7..76d09161fdd 100644 --- a/src/hotspot/share/classfile/verifier.cpp +++ b/src/hotspot/share/classfile/verifier.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -620,9 +620,6 @@ TypeOrigin ClassVerifier::ref_ctx(const char* sig) { void ClassVerifier::verify_class(TRAPS) { log_info(verification)("Verifying class %s with new format", _klass->external_name()); - // Either verifying both local and remote classes or just remote classes. - assert(BytecodeVerificationRemote, "Should not be here"); - Array* methods = _klass->methods(); int num_methods = methods->length(); diff --git a/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java b/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java index fa6bf0b98d4..eeedd9b583c 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java +++ b/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 6402717 8330606 + * @bug 6402717 8330606 8376295 * @summary Redefine VerifyError to get a VerifyError should not throw SOE * @requires vm.jvmti * @library /test/lib @@ -33,10 +33,17 @@ * java.instrument * jdk.jartool/sun.tools.jar * @run main RedefineClassHelper + * * @run main/othervm/timeout=180 * -javaagent:redefineagent.jar * -Xlog:class+init,exceptions * RedefineVerifyError + * + * @run main/othervm/timeout=180 + * -javaagent:redefineagent.jar + * -Xlog:class+init,exceptions + * -XX:-BytecodeVerificationRemote + * RedefineVerifyError */ import org.objectweb.asm.AnnotationVisitor;