RFR: 8320222: Wrong bytecode accepted, and StackMap table generated [v2]
Adam Sotona
asotona at openjdk.org
Mon Nov 20 17:17:16 UTC 2023
On Thu, 16 Nov 2023 11:25:07 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> changed StackMapGenerator::generatorError to return an exception instead of directly throw
>
> src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java line 1138:
>
>> 1136: }
>> 1137: if (stackSize != target.stackSize) {
>> 1138: generatorError("Stack size mismatch");
>
> Just a side comment, `generatorError` should return a Throwable than throw directly, so when used as `throw generatorError()`, it is more clear that the code branch will terminate to javac.
Good point, changed, thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16685#discussion_r1399513530
More information about the core-libs-dev
mailing list