Thu 24 Oct 2024 15:00 - 15:20 at San Gabriel - Compilers and Optimisation 2 Chair(s): Manu Sridharan

Java decompilers are programs that perform the reverse process of Java compilers, i.e., they translate Java bytecode to Java source code. They are essential for reverse engineering purposes and have become more sophisticated and reliable over the years. However, it remains challenging for modern Java decompilers to reliably perform correct decompilation on real-world programs. To shed light on the key challenges of Java decompilation, this paper provides the first systematic study on the characteristics and causes of bugs in mature, widely-used Java decompilers. We conduct the study by investigating 333 unique bugs from three popular Java decompilers. Our key findings and observations include: (1) Although most of the reported bugs were found when decompiling large, real-world code, 40.2% of them have small test cases for bug reproduction; (2) Over 80% of the bugs manifest as exceptions, syntactic errors, or semantic errors, and bugs with source code artifacts are very likely semantic errors; (3) 57.7%, 39.0%, and 41.1% of the bugs respectively are attributed to three stages of decompilers—loading structure entities from bytecode, optimizing these entities, and generating source code from these entities; (4) Bugs in decompilers’ type inference are the most complex to fix; and (5) Region restoration for structures like loop, sugaring for special structures like switch, and type inference of variables of generic types or indistinguishable types are the three most significant challenges in Java decompilation, which to some extent explains our findings in (3) and (4).

Based on these findings, we present JD-Tester, a differential testing framework for Java decompilers, and our experience of using it in testing the three popular Java decompilers. JD-Tester utilizes different Java program generators to construct executable Java tests and finds exceptions, syntactic, and semantic inconsistencies (i.e. bugs) between a generated test and its compiled-decompiled version (through compilation and execution). In total, we have found 62 bugs in the three decompilers, demonstrating both the effectiveness of JD-Tester, and the importance of testing and validating Java decompilers.

Thu 24 Oct

Displayed time zone: Pacific Time (US & Canada) change

13:40 - 15:20
Compilers and Optimisation 2OOPSLA 2024 at San Gabriel
Chair(s): Manu Sridharan University of California at Riverside
13:40
20m
Talk
Hydra: Generalizing Peephole Optimizations with Program Synthesis
OOPSLA 2024
Manasij Mukherjee NVIDIA, John Regehr University of Utah
DOI Pre-print
14:00
20m
Talk
Minotaur: A SIMD-Oriented Synthesizing SuperoptimizerOOPSLA 2024 Distinguished Paper Award
OOPSLA 2024
Zhengyang Liu University of Utah, Stefan Mada University of Utah, John Regehr University of Utah
DOI
14:20
20m
Talk
PolyJuice: Detecting Mis-Compilation Bugs in Tensor Compilers with Equality Saturation Based Rewriting
OOPSLA 2024
Chijin Zhou Tsinghua University, Bingzhou Qian National University of Defense Technology, Gwihwan Go Tsinghua University, Quan Zhang Tsinghua University, Shanshan Li National University of Defense Technology, Yu Jiang Tsinghua University
DOI
14:40
20m
Talk
SparseAuto: An Auto-Scheduler for Sparse Tensor Computations Using Recursive Loop Nest Restructuring
OOPSLA 2024
Adhitha Dias Purdue University, USA, Logan Anderson Purdue University, Kirshanthan Sundararajah Virginia Tech, Artem Pelenitsyn Purdue University, Milind Kulkarni Purdue University
DOI Pre-print
15:00
20m
Talk
Understanding and Finding Java Decompiler Bugs
OOPSLA 2024
Yifei Lu Nanjing University, Weidong Hou Nanjing University, Minxue Pan Nanjing University, Xuandong Li Nanjing University, Zhendong Su ETH Zurich
DOI