You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated from janino-compiler/janino#113 - the original issue was fixed, but while debugging, disassembler doesn't give any information against corrupted class file hence had to figure out with the field code (byte array) against debugger.
Corrupted class file was generated from Janino (the reason was janino-compiler/janino#113) - I've set breakpoint to UnitCompiler.addClassFile and force debugger to write cf.byteArray() to the file, as well as run Disassembler.disassembleToStdout(cf.toByteArray()).
classfile.class: The content cf.byteArray() is stored.
classfile.class.decompiled-javac: The output from javap -c -p -v classfile.class
It threw error and stopped printing out disassembled code where the bug has been spotted. (tableswitch is in offset 578 in expand_doConsume - got the information while debugging with code field)
Error: A serious internal error has occurred: java.lang.NegativeArraySizeException
Please file a bug report, and include the following information:
java.lang.NegativeArraySizeException
at com.sun.tools.classfile.Instruction.accept(Instruction.java:288)
at com.sun.tools.javap.CodeWriter.writeInstr(CodeWriter.java:126)
at com.sun.tools.javap.CodeWriter.writeInstrs(CodeWriter.java:108)
at com.sun.tools.javap.CodeWriter.write(CodeWriter.java:75)
at com.sun.tools.javap.AttributeWriter.visitCode(AttributeWriter.java:220)
at com.sun.tools.javap.AttributeWriter.visitCode(AttributeWriter.java:75)
at com.sun.tools.classfile.Code_attribute.accept(Code_attribute.java:102)
at com.sun.tools.javap.AttributeWriter.write(AttributeWriter.java:101)
at com.sun.tools.javap.ClassWriter.writeMethod(ClassWriter.java:508)
at com.sun.tools.javap.ClassWriter.writeMethods(ClassWriter.java:412)
at com.sun.tools.javap.ClassWriter.write(ClassWriter.java:217)
at com.sun.tools.javap.JavapTask.write(JavapTask.java:784)
at com.sun.tools.javap.JavapTask.writeClass(JavapTask.java:606)
at com.sun.tools.javap.JavapTask.run(JavapTask.java:560)
at com.sun.tools.javap.JavapTask.run(JavapTask.java:423)
at com.sun.tools.javap.Main.main(Main.java:46)
classfile.class.decompiled-jdisasm-1.x: The output from Disassembler.disassembleToStdout(cf.toByteArray()) (I've done with two versions: 1.4 and 1.5)
classfile.class.decompiled-jdisasm-1.5-cli: The output from de.unkrig.jdisasm.Disassembler -verbose
All outputs from jdisasm silently threw out the part (entire code in the method - expand_doConsume) where corrupted operation is placed.
As jdisasm is the recommended way to report the bug on Janino, it would be nice to catch the corrupted code and throw out error (or tolerate the error but log the error message at least).
The text was updated successfully, but these errors were encountered:
Migrated from janino-compiler/janino#113 - the original issue was fixed, but while debugging, disassembler doesn't give any information against corrupted class file hence had to figure out with the field
code
(byte array) against debugger.Corrupted class file was generated from Janino (the reason was janino-compiler/janino#113) - I've set breakpoint to
UnitCompiler.addClassFile
and force debugger to writecf.byteArray()
to the file, as well as runDisassembler.disassembleToStdout(cf.toByteArray())
.Archive.zip
error-codegen.log
: The code triggered the bug Padding for TABLESWITCH can be applied multiple times due to grow on relocatables janino-compiler/janino#113classfile.class
: The contentcf.byteArray()
is stored.classfile.class.decompiled-javac
: The output fromjavap -c -p -v classfile.class
It threw error and stopped printing out disassembled code where the bug has been spotted. (
tableswitch
is in offset 578 inexpand_doConsume
- got the information while debugging withcode
field)classfile.class.decompiled-jdisasm-1.x
: The output fromDisassembler.disassembleToStdout(cf.toByteArray())
(I've done with two versions: 1.4 and 1.5)classfile.class.decompiled-jdisasm-1.5-cli
: The output fromde.unkrig.jdisasm.Disassembler -verbose
All outputs from jdisasm silently threw out the part (entire code in the method -
expand_doConsume
) where corrupted operation is placed.As jdisasm is the recommended way to report the bug on Janino, it would be nice to catch the corrupted code and throw out error (or tolerate the error but log the error message at least).
The text was updated successfully, but these errors were encountered: