AccMon: Automatically detecting memory-related bugs via program counter-based invariants

Pin Zhou, Wei Liu, Long Fei, Shan Lu, Feng Qin, Yuanyuan Zhou, Samuel Midkiff, Josep Torrellas

Research output: Contribution to journalConference articlepeer-review


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.

Original languageEnglish (US)
Pages (from-to)269-280
Number of pages12
JournalProceedings of the Annual International Symposium on Microarchitecture, MICRO
StatePublished - 2004
Event37th International Symposium on Microarchitecture - MICRO-37 2004 - Portland, OR, United States
Duration: Dec 4 2004Dec 8 2004

ASJC Scopus subject areas

  • General Engineering


Dive into the research topics of 'AccMon: Automatically detecting memory-related bugs via program counter-based invariants'. Together they form a unique fingerprint.

Cite this