Back to Search Start Over

Deciding Memory Safety for Single-Pass Heap-Manipulating Programs

Authors :
Mathur, Umang
Murali, Adithya
Krogmeier, Paul
Madhusudan, P.
Viswanathan, Mahesh
Source :
Proceedings of the ACM on Programming Languages Vol. 4, Issue POPL, Article 35 (December 2019)
Publication Year :
2019

Abstract

We investigate the decidability of automatic program verification for programs that manipulate heaps, and in particular, decision procedures for proving memory safety for them. We extend recent work that identified a decidable subclass of uninterpreted programs to a class of alias-aware programs that can update maps. We apply this theory to develop verification algorithms for memory safety--- determining if a heap-manipulating program that allocates and frees memory locations and manipulates heap pointers does not dereference an unallocated memory location. We show that this problem is decidable when the initial allocated heap forms a forest data-structure and when programs are streaming-coherent, which intuitively restricts programs to make a single pass over a data-structure. Our experimental evaluation on a set of library routines that manipulate forest data-structures shows that common single-pass algorithms on data-structures often fall in the decidable class, and that our decision procedure is efficient in verifying them.<br />Comment: StreamVerif tool for automata-based verification of uninterpreted programs can be found at https://github.com/umangm/streamverif

Details

Database :
arXiv
Journal :
Proceedings of the ACM on Programming Languages Vol. 4, Issue POPL, Article 35 (December 2019)
Publication Type :
Report
Accession number :
edsarx.1907.00298
Document Type :
Working Paper
Full Text :
https://doi.org/10.1145/3371103