AccMon: Automatically Detecting Memory-Related Bugs via Program Counter-Based Invariants
- 13 December 2005
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 10724451,p. 269-280
- https://doi.org/10.1109/micro.2004.3
Abstract
This paper makes two contributions to architectural support for software debugging. First, it proposes a novel statistics-based, on-the-fly bug detection method called PC-based invariant detection. The idea is based on the observation that, in most programs, a given memory location is typically accessed by only a few instructions. Therefore, by capturing the invariant of the set of PCs that normally access a given variable, we can detect accesses by outlier instructions, which are often caused by memory corruption, buffer overflow, stack smashing or other memory-related bugs. Since this method is statistics-based, it can detect bugs that do not violate any programming rules and that, therefore, are likely to be missed by many existing tools. The second contribution is a novel architectural extension called the Check Look-aside Buffer (CLB). The CLB uses a Bloom filter to reduce monitoring overheads in the recently-proposed iWatcher architectural framework for software debugging. The CLB significantly reduces the overhead of PC-based invariant debugging. We demonstrate a PC-based invariant detection tool called AccMon that leverages architectural, run-time system and compiler support. Our experimental results with seven buggy applications and a total of ten bugs, show that AccMon can detect all ten bugs with few false alarms (0 for five applications and 2-8 for two applications) and with low overhead (0.24-2.88 times). Several existing tools evaluated, including Purify, CCured and value-based invariant detection tools, fail to detect some of the bugs. In addition, Purify's overhead is one order of magnitude higher than AccMon's. Finally, we show that the CLB is very effective at reducing overhead.Keywords
This publication has 28 references indexed in Scilit:
- Scalable hardware memory disambiguation for high ILP processorsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2004
- A "flight data recorder" for enabling full-system multiprocessor deterministic replayPublished by Association for Computing Machinery (ACM) ,2003
- Dynamic program instrumentation for scalable performance toolsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Quickly detecting relevant program invariantsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Mondrian memory protectionPublished by Association for Computing Machinery (ACM) ,2002
- Extended static checking for JavaPublished by Association for Computing Machinery (ACM) ,2002
- Dynamically discovering likely program invariants to support program evolutionPublished by Association for Computing Machinery (ACM) ,1999
- ATOMPublished by Association for Computing Machinery (ACM) ,1994
- Efficient data breakpointsPublished by Association for Computing Machinery (ACM) ,1992
- Some requirements for architectural support of software debuggingPublished by Association for Computing Machinery (ACM) ,1982