ABSTRACT
Embedded applications with a long running life time particularly require a high degree of reliability. Many types of weaknesses residing in software can reduce the reliability, but memory leaks are prominent sources of software weaknesses for long running applications. As memory leaks are typically cumbersome and illusive, finding their sources demands programmers to make a huge effort even with fairly automated memory leak detection tools. Recently, dynamic detectors with light overheads have been emerged. They use sampling-based techniques to reduce overheads. According to the frequencies of code executions and data accesses, the memory monitor adaptively controls the sampling periods. The accuracies of existing sampling techniques are, however, unsatisfactory in some cases. In this paper, we present a more accurate memory leak detection technique, which takes advantage of context information. Our memory leak detector, which is also based on data sampling, adopts a notion of context (or call path) to sort out dynamically allocated memories and more accurately tracks the sources of memory leaks in the source code. Our experiments with SPEC CINT2000 benchmarks show our technique finds more memory leaks by up to 72% with comparable overheads to the existing data sampling technique.
- M. Arnold and B. Ryder. A framework for reducing the cost of instrumented code. In Proceedings of PLDI'01. ACM, 2001. Google ScholarDigital Library
- M. D. Bond and K. S. McKinley. Tolerating memory leaks. In Proceedings of OOPSLA '08. ACM, 2008. Google ScholarDigital Library
- T. M. Chilimbi and M. Hauswirth. Low-overhead memory leak detection using adaptive statistical profiling. In Proceedings of ASPLOS'04. ACM, 2004. Google ScholarDigital Library
- E. D. B. Gene Novark and B. G. Zorn. Efficiently and precisely locating memory leaks and bloat. In Proceedings of PLDI'09. ACM, 2009. Google ScholarDigital Library
- D. L. Heine and M. S. Lam. A practical flow-sensitive and context-sensitive c and c++ memory leak detector. In Proceedings of PLDI'03. ACM, 2003. Google ScholarDigital Library
- J. L. Henning. SPEC CPU2000: Measuring CPU performance in the new millennium. IEEE Computer, pages 28--35, July 2000. Google ScholarDigital Library
- N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In Proceedings of PLDI'07. ACM, 2007. Google ScholarDigital Library
- H. H. Nguyen and M. Rinard. Detecting and eliminating memory leaks using cyclic memory allocation. In Proceedings of ISMM'07. ACM, 2007. Google ScholarDigital Library
- L. P. S. Cherem and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In Proceedings of PLDI'07. ACM, 2007. Google ScholarDigital Library
- M. L. Seidl and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Proceedings of ASPLOS'98. ACM, 1998. Google ScholarDigital Library
- Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In Proceedings of ESEC/FSE'05. ACM, 2005. Google ScholarDigital Library
- Q. G. Y. Tang and F. Qin. Leaksurvivor: Towards safely tolerating memory leaks for garbage-collected languages. In Proceedings of USENIX '08, 2008. Google ScholarDigital Library
Index Terms
- Memory leak detection with context awareness
Recommendations
Automated memory leak detection for production use
ICSE 2014: Proceedings of the 36th International Conference on Software EngineeringThis paper presents Sniper, an automated memory leak detection tool for C/C++ production software. To track the staleness of allocated memory (which is a clue to potential leaks) with little overhead (mostly <3%), Sniper leverages instruction sampling ...
Context- and path-sensitive memory leak detection
ESEC/FSE-13: Proceedings of the 10th European software engineering conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of software engineeringWe present a context- and path-sensitive algorithm for detecting memory leaks in programs with explicit memory management. Our leak detection algorithm is based on an underlying escape analysis: any allocated location in a procedure P that is not ...
Memory Leak Detection in Sun Solaris OS
ISCSCT '08: Proceedings of the 2008 International Symposium on Computer Science and Computational Technology - Volume 02Memory leak has been exposed to be one of the most serious bugs which are hard to locate and fix in computer program. This paper describes three methods of detecting memory leaks in Solaris when programmers do applications. Using dbx can get specific ...
Comments