Published January 24, 2016 | Version v1

Defensive Analysis: Soundness in Extreme Conditions (Technical Report)

Authors/Creators

  • 1. University of Athens

Description

Virtually no realistic whole-program static analysis is sound,
i.e., guaranteed to over-approximate all program behaviors.
The main cause of such unsoundness is “opaque code” fea-
tures such as reflection, dynamic loading, and native calls.
We present a defensive may-point-to analysis approach,
which offers soundness in the presence of opaque code. Our
analysis assumes (unless informed otherwise) that native
code or reflection can have arbitrary effects, and arbitrary
new code can be loaded.

The analysis represents points-to information only when
it knows it to be a safe over-approximation of dynamic be-
havior. This allows us to perform a highly precise points-to
analysis (such as a 5-call-site-sensitive, flow-sensitive anal-
ysis) efficiently. We show that sound handling of opaque
code cannot be an incremental addition: the analysis logic
for other language features changes radically when opaque
code needs to be handled soundly.

Despite its conservative nature, our analysis yields sound,
actionable results for a large subset of the program code,
achieving (under worst-case assumptions) 34-74% of the
program coverage of an unsound state-of-the-art analysis for
real-world programs.

Files

sound-may.pdf

Files (233.3 kB)

Name Size
md5:633a669ffafc2481805b460d3fa28263
233.3 kB Preview Download

Additional details

Funding

European Commission
SPADE - Sophisticated Program Analysis, Declaratively 307334