On Fri, 15 Nov 2024 12:32:14 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java >> line 68: >> >>> 66: classWriter.visit(52, ACC_SUPER | ACC_PUBLIC, >>> "java/lang/VerifyError", null, "java/lang/LinkageError", null); >>> 67: { >>> 68: fieldVisitor = classWriter.visitField(ACC_PRIVATE | >>> ACC_FINAL | ACC_STATIC, "serialVersionUID", "J", null, new >>> Long(7001962396098498785L)); >> >> Why do we need a serialVersionUID in this test class? > > TEST RESULT: Failed. Execution failed: `main' threw exception: > java.lang.UnsupportedOperationException: class redefinition failed: attempted > to change the schema (add/remove fields) > > Because it's a field in VerifyError Got it. >> test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineVerifyError.java >> line 90: >> >>> 88: } >>> 89: >>> 90: { // broken method >> >> Please add a comment showing the Java code this asm is implementing. > > This test came from asmifying java.lang.VerifyError and hacking it to have a > VerifyError. The code it's implementing is a lot of code and not > interesting. I can try cutting some things out. I hadn't quite grasped the basic operation of the test - I get it now. Thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22116#discussion_r1845770225 PR Review Comment: https://git.openjdk.org/jdk/pull/22116#discussion_r1845772256