Automatically extracting templates for testing Java JIT compilers

Date

2021-08-12

Authors

Wiatrek, Nathaniel Brett

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

The Java programming language is widely used in industry and academia. Since the language is object-oriented and platform independent, it is a perfect solution to deliver a variety of programs. To increase performance, Java optimizes running software with the use of just-in-time (JIT) compilation, in which the JIT compiler will generate new code that is more streamlined. If there is a bug in this newly generated code there could be significant consequences. To validate JIT correctness JITAttack was developed, which leverages program templates to test compilers (such as Java JIT). These templates are currently manually-written and time-intensive to create. We present a tool, JITTEMPLATER, that is designed to take in a Java program and create templates to be used with JITAttack’s JIT compiler testing. JITTEMPLATER parses the Abstract Syntax Tree of the given Java file to convert statements and expressions to their equivalent in JITAttack’s API. JITTEMPLATER is part of a larger process that takes in a real-world Java project to convert into a project of templates for testing purposes. The automation of template extraction leads to novel and interesting inputs to be used with JITAttack. To date, we have found three bugs utilizing real-world Java programs that were extracted by JITTEMPLATER.

Description

LCSH Subject Headings

Citation