Decompiling Java Bytecode: Problems, Traps and Pitfalls

作者: Jerome Miecznikowski , Laurie Hendren

DOI: 10.1007/3-540-45937-5_10

关键词: JavaReal time JavaProgramming languageJava annotationJava bytecodeGenerics in JavaJava appletComputer scienceJava Modeling LanguageBytecode

摘要: Java virtual machines execute bytecode instructions. Since this is a higher level representation than traditional object code, it possible to decompile back source. Many such decompilers have been developed and the conventional wisdom that decompiling relatively simple. This may be true when produced directly from specific compiler, most often Sun's javac compiler. In case really matter of inverting known compilation strategy. However, there are many problems, traps pitfalls arbitrary verifiable bytecode. Such could by other compilers, byte-code optimizers or obfuscators. can also compilers for languages, including Haskell, Eiffel, ML, Ada Fortran. These use very different code generation strategies javac.This paper outlines problems solutions we found in our development Dava, decompiler We first outline assigning types variables literals, due expression evaluation on stack. Then, look at finding structured control flow with particular emphasis issues related exceptions synchronized blocks. Throughout provide small examples which not properly decompiled commonly used decompilers.

参考文章(11)
Raja Vallee-Rai, Patrick Lam, Vijay Sundaresan, Laurie Hendren, Phong Co, Etienne M. Gagnon, Soot---a java optimization framework conference of the centre for advanced studies on collaborative research. ,(1999)
Todd A. Proebsting, Scott A. Watterson, Krakatoa: decompilation in java (dose bytecode reveal source?) usenix conference on object oriented technologies and systems. pp. 14- 14 ,(1997)
Etienne M. Gagnon, Laurie J. Hendren, Guillaume Marceau, Efficient Inference of Static Types for Java Bytecode static analysis symposium. pp. 199- 219 ,(2000) , 10.1007/978-3-540-45099-3_11
Raja Vallée-Rai, Etienne Gagnon, Laurie Hendren, Patrick Lam, Patrice Pominville, Vijay Sundaresan, Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? compiler construction. pp. 18- 34 ,(2000) , 10.1007/3-540-46423-9_2
Todd B. Knoblock, Jakob Rehof, Type elaboration and subtype completion for Java bytecode symposium on principles of programming languages. pp. 228- 242 ,(2000) , 10.1145/325694.325725
Lyle Ramshaw, Eliminating go to's while preserving program structure Journal of the ACM. ,vol. 35, pp. 893- 920 ,(1988) , 10.1145/48014.48021
Brenda S. Baker, An Algorithm for Structuring Flowgraphs Journal of the ACM. ,vol. 24, pp. 98- 120 ,(1977) , 10.1145/321992.321999
A.M. Erosa, L.J. Hendren, Taming control flow: a structured approach to eliminating goto statements international conference on computational logistics. pp. 229- 240 ,(1994) , 10.1109/ICCL.1994.288377
J. Miecznikowski, L. Hendren, Decompiling Java using staged encapsulation working conference on reverse engineering. pp. 368- 374 ,(2001) , 10.1109/WCRE.2001.957845
Cristina Cifuentes, Reverse compilation techniques Queensland University of Technology. ,(1994)