RFR: Intentionally removed ACC_SUPER class modifier was causing hotswap to fail

Jiří Vaněk jvanek at openjdk.org
Sat Jul 30 14:03:35 UTC 2022


On Sat, 30 Jul 2022 13:42:14 GMT, Jiří Vaněk <jvanek at openjdk.org> wrote:

> When jasm's  disasm, modify, asm cycle output binary was used for class
> hotswap, remote JDK was not accepting it with java.lang.UnsupportedOperationException:
> class redefinition failed: attempted to change the class modifiers
> beacuse of ommited supoer keyword (although it have already no real
> reason)
> 
> This patch is returning the keyword without conditions, when it was
> included in original bytecode

Hello! This is the issue we had email chat month ago ( I now do not have email access), when I was complaining the output bytecode being different from original, and that running VM would not accept it for class hotswap.

It seems that for basic jasm, the intentionally omitted super class' keyword was the cause.  This patch had returned it.

Please be carefull with the review, I'm not exactly sure if I had not broken some other usecese by removing ```if (isName)```

Although I claim  "This patch is returning the keyword without conditions, when it was included in original bytecode" I'm not sure with the "when it was included in original"  part. Although I had removed teh only amend of ```access``` field, I could have overlooked.

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

PR: https://git.openjdk.org/asmtools/pull/26


More information about the asmtools-dev mailing list