aunkrig / jdisasm Goto Github PK
View Code? Open in Web Editor NEWA disassembler for Java .class files
License: BSD 3-Clause "New" or "Revised" License
A disassembler for Java .class files
License: BSD 3-Clause "New" or "Revised" License
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())
.
error-codegen.log
: The code triggered the bug janino-compiler/janino#113
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).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.