RFR: Intentionally removed ACC_SUPER class modifier was causing hotswap to fail [v2]
Jiří Vaněk
jvanek at openjdk.org
Sat Jul 30 14:46:46 UTC 2022
On Sat, 30 Jul 2022 14:29:23 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
>
> Jiří Vaněk has updated the pull request incrementally with one additional commit since the last revision:
>
> extended test to verify that super is not used always
>
> if super is not in source code, then it is not in disambled code
This simple PR is fixing all my tests which were failing hotswap with pure jdis/jasm. However, when jdis is run with ```-g``` its following asm output is not accpted by running vm with much more severe "'java.lang.ClassFormatError'"
Unlike the "super" issue, where most was failing, in the "'java.lang.ClassFormatError'"
just few complex classes are failing eg: ```com.google.gson.Gson.class``` (just disasm it with disasm -g and try to jasm it back again)
-------------
PR: https://git.openjdk.org/asmtools/pull/26
More information about the asmtools-dev
mailing list