skip to main content
10.1145/2892208.2892235acmconferencesArticle/Chapter ViewAbstractPublication PagesccConference Proceedingsconference-collections
short-paper

SVF: interprocedural static value-flow analysis in LLVM

Published:17 March 2016Publication History

ABSTRACT

This paper presents SVF, a tool that enables scalable and precise interprocedural Static Value-Flow analysis for C programs by leveraging recent advances in sparse analysis. SVF, which is fully implemented in LLVM, allows value-flow construction and pointer analysis to be performed in an iterative manner, thereby providing increasingly improved precision for both. SVF accepts points- to information generated by any pointer analysis (e.g., Andersen’s analysis) and constructs an interprocedural memory SSA form, in which the def-use chains of both top-level and address-taken variables are captured. Such value-flows can be subsequently exploited to support various forms of program analysis or enable more precise pointer analysis (e.g., flow-sensitive analysis) to be performed sparsely. By dividing a pointer analysis into three loosely coupled components: Graph, Rules and Solver, SVF provides an extensible interface for users to write their own solutions easily. SVF is publicly available at http://unsw-corg.github.io/SVF.

References

  1. P. Anderson and T. Teitelbaum. Software inspection using codesurfer. In Workshop on Inspection in Software Engineering (WISE ’01), 2001.Google ScholarGoogle Scholar
  2. J. R. Andrew Trick. FTL WebKit’s LLVM based JIT. In LLVM Developer Meeting 2014, 2014.Google ScholarGoogle Scholar
  3. S. Arzt, S. Rasthofer, C. Fritz, E. Bodden, A. Bartel, J. Klein, Y. Le Traon, D. Octeau, and P. McDaniel. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for android apps. PLDI ’14, 49(6):259–269, June 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. F. Chow, S. Chan, S. Liu, R. Lo, and M. Streich. Effective representation of aliases and indirect memory operations in SSA form. In CC ’96, pages 253–267. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. K. Cristina Cifuentes Oracle Labs Australia, Oracle. Translating Java into LLVM IR to detect security vulnerabilities. In LLVM Developer Meeting 2014, 2014.Google ScholarGoogle Scholar
  6. R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. An efficient method of computing static single assignment form. In POPL ’89, pages 25–35. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Di and Y. Sui. Accelerating dynamic data race detection using static thread interference analysis. In PMAM ’16, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Ferrante, K. J. Ottenstein, and J. D. Warren. The program dependence graph and its use in optimization. TOPLAS ’87, 9(3):319–349, July 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. B. Hardekopf and C. Lin. Flow-sensitive pointer analysis for millions of lines of code. In CGO ’11, pages 289–298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. In PLDI ’88, pages 35–46, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. IBM. T.j. watson libraries for analysis (WALA).Google ScholarGoogle Scholar
  12. P. Lam, E. Bodden, O. Lhoták, and L. Hendren. The Soot framework for Java program analysis: a retrospective. In in CETUS ’11, 2011.Google ScholarGoogle Scholar
  13. C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO ’’04, pages 75–86, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. O. Lhoták and K.-C. A. Chung. Points-to analysis with efficient strong updates. In POPL ’11, pages 3–16.Google ScholarGoogle Scholar
  15. V. B. Livshits and M. S. Lam. Tracking pointers with path and context sensitivity for bug detection in C programs. In FSE ’03, pages 317– 326. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Novillo and R. H. Canada. Memory SSA-a unified approach for sparsely representing memory operations. In Proc of the GCC Developers’ Summit. Citeseer, 2007.Google ScholarGoogle Scholar
  17. H. Oh, K. Heo, W. Lee, W. Lee, and K. Yi. Design and implementation of sparse global analyses for C-like languages. In PLDI ’12, pages 229–238. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. F. Pereira and D. Berlin. Wave propagation and deep propagation for pointer analysis. In CGO ’09, pages 126–135. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL ’95, pages 49–61, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Y. Sui, P. Di, and J. Xue. Sparse flow-sensitive pointer analysis for multithreaded programs. In CGO ’16, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Y. Sui, D. Ye, and J. Xue. Static memory leak detection using fullsparse value-flow analysis. In ISSTA ’12, pages 254–264. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Y. Sui, D. Ye, and J. Xue. Detecting memory leaks statically with full-sparse value-flow analysis. IEEE Transactions on Software Engineering, 40(2):107–122, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Y. Sui, S. Ye, J. Xue, and P. Yew. SPAS: Scalable path-sensitive pointer analysis on full-sparse SSA. In APLAS ’11, pages 155–171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Weiser. Programmers use slices when debugging. Commun. ACM, 25(7):446–452, July 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. Ye, Y. Sui, and J. Xue. Accelerating dynamic detection of uses of undefined variables with static value-flow analysis. In CGO ’14, pages 154–164. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Ye, Y. Sui, and J. Xue. Region-based selective flow-sensitive pointer analysis. In SAS ’14, pages 319–336. Springer, 2014.Google ScholarGoogle Scholar

Index Terms

  1. SVF: interprocedural static value-flow analysis in LLVM

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      CC 2016: Proceedings of the 25th International Conference on Compiler Construction
      March 2016
      270 pages
      ISBN:9781450342414
      DOI:10.1145/2892208
      • General Chair:
      • Ayal Zaks,
      • Program Chair:
      • Manuel Hermenegildo

      Copyright © 2016 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 March 2016

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • short-paper

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader