Deep Static Modeling of invokedynamic

01/08/2020
by   George Fourtounis, et al.
0

Java 7 introduced programmable dynamic linking in the form of the invokedynamic framework. Static analysis of code containing programmable dynamic linking has often been cited as a significant source of unsoundness in the analysis of Java programs. For example, Java lambdas, introduced in Java 8, are a very popular feature, which is, however, resistant to static analysis, since it mixes invokedynamic with dynamic code generation. These techniques invalidate static analysis assumptions: programmable linking breaks reasoning about method resolution while dynamically generated code is, by definition, not available statically. In this paper, we show that a static analysis can predictively model uses of invokedynamic while also cooperating with extra rules to handle the runtime code generation of lambdas. Our approach plugs into an existing static analysis and helps eliminate all unsoundness in the handling of lambdas (including associated features such as method references) and generic invokedynamic uses. We evaluate our technique on a benchmark suite of our own and on third-party benchmarks, uncovering all code previously unreachable due to unsoundness, highly efficiently.

READ FULL TEXT

page 4

page 5

page 7

research
07/19/2022

To what extent can we analyze Kotlin programs using existing Java taint analysis tools? (Extended Version)

As an alternative to Java, Kotlin has gained rapid popularity since its ...
research
05/06/2019

Heaps Don't Lie: Countering Unsoundness with Heap Snapshots

Static analyses aspire to explore all possible executions in order to ac...
research
02/24/2018

Evaluating Design Tradeoffs in Numeric Static Analysis for Java

Numeric static analysis for Java has a broad range of potentially useful...
research
06/14/2017

Understanding and Analyzing Java Reflection

Java reflection has been increasingly used in a wide range of software. ...
research
10/26/2021

Neural Program Generation Modulo Static Analysis

State-of-the-art neural models of source code tend to be evaluated on th...
research
02/18/2018

Efficient Gradual Typing

Gradual typing combines static and dynamic typing in the same program. O...
research
05/16/2023

Experiences in Building a Composable and Functional API for Runtime SPIR-V Code Generation

This paper presents the Beehive SPIR-V Toolkit; a framework that can aut...

Please sign up or login with your details

Forgot password? Click here to reset