On Mon, 17 May 2021 13:11:56 GMT, Adam Sotona <asot...@openjdk.org> wrote:

> Actual javap implementation reacts on corrupted TABLESWITCH or LOOKUPSWITCH 
> bytecode instructions resulting to negative array allocation with 
> NegativeArraySizeException, which is reported to user with stack trace and as 
> serious internal error.
> 
> The fix in c.s.t.classfile.Instruction is checking for negative array size of 
> corrupted TABLESWITCH or LOOKUPSWITCH bytecode and throwing 
> j.l.IllegalStateException instead of the NegativeArraySizeException.
>  
> Another part of the fix in c.s.t.javap.CodeWriter is catching 
> j.l.IllegalStateException and reporting it as error in the analyzed bytecode, 
> instead of passing it up and causing serious internal javap error.

lgtm

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

Marked as reviewed by vromero (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4061

Reply via email to