Design of an Automated Testing Tool to Detect Dynamic Memory Access Errors in C Programs

C언어 기반 프로그램의 동적 메모리 접근 오류 테스트 자동화 도구 설계

  • 조대완 (충남대학교 컴퓨터공학과) ;
  • 오승욱 (슈어소프트테크(주) 연구소) ;
  • 김현수 (충남대학교 컴퓨터공학과)
  • Published : 2007.08.15

Abstract

Memory access errors are frequently occurred in computer programs written in C programming language [1,2]. Accordingly, a number of research works have suggested a wide variety of methods to detect such errors automatically. However, they have one or more of the following problems: inability to detect all memory errors, changing the memory allocation mechanism, and excessive performance overhead. To cope with these problems, in this paper we suggest a new and automated tool to detect dynamic memory access errors in C programs.

메모리 접근연산으로부터 발생되는 프로그램 오류는 C언어로 작성된 테스트 대상 프로그램에서 가장 빈번하게 발생하는 오류이다[1,2]. 기존연구를 통해 이런 문제점을 해결하기 위한 다양한 메모리 오류 자동검출 방법들이 제안되었다. 하지만 기존의 오류검출방법은 테스트 대상 프로그램에 가해지는 부가적인 오버헤드가 매우 크거나 검출할 수 있는 메모리 접근오류의 종류가 제한적이다. 또한 메모리 할당함수의 내부구현에 의존성을 갖고 있기 때문에 플랫폼 간 이식성(portability)이 떨어지는 단점을 갖고 있다. 본 연구에서는 이러한 문제점을 해결하기 위해 새로운 메모리 접근오류 검출기법을 제안하고 테스트 자동화 도구를 설계하였다.

Keywords

References

  1. Barton P. Miller, Lars Fredriksen, and Bryan So. 'An empirical study of the reliability of Unix utilities,' Communications of the ACM, 33(12): 32-44, December 1990 https://doi.org/10.1145/96267.96279
  2. Mark Sullivan and Ram Chillarege, 'Software defects and their impact on system availability - a study of field failures in operation systems,' Digest of the 21st International Symposium on Fault Tolerant Computing, pp. 2-9, June 1991
  3. W. Xu, D. C. DuVarney, and R.Sekar, 'An efficient and backwards-compatible transformation to ensure memory safety of C programs,' Proc. of the 12th ACM SIGSOFT Symp. on the FSE, Oct. 2004, pp. 117-126
  4. T. Austin, S. Breach, and G. Sohi, 'Efficient detection of all pointer and array access errors,' In Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation, June 1994
  5. R. Jones and P. Kelly, 'Backwards-compatible bounds checking for arrays and pointers in C programs,' In Proceeding of Third International Workshop On Automatic Debugging, May 1997
  6. O. Ruwase and M. Lam, 'A practical dynamic buffer overflow detector,' In Proceedings of the Network and Distributed System Security (NDSS) Symposium, pp. 159-169, Feb. 2004
  7. D. Dhurjati, V. Adve, 'Backwards-compatible array bounds checking for C with very low overhead,' In Proceeding of the 28th international conference on software engineering(ICSE), Shanhai, China, May 2006
  8. R. Hastings and B. Joyce, 'Purify: fast detection of memory leaks and access errors,' In Proceedings of the Winter USENIX Conference, pp. 125-136, 1992
  9. Valgrind Online Manual. http://valgrind.org/docs/manual/manual.htm
  10. D. A. Wheeler. Sloccount http://www.dwheeler.com/sloccount
  11. G. C. Necula, J. Condit, M. Harren, S. McPeak, and W. Weimer, 'CCured: type-safe retrofitting of legacy software,' ACM Trans. Program. Lang. Syst., 27(3):477-526, 2005 https://doi.org/10.1145/1065887.1065892
  12. T. Jim, G. Morriset, D. Grossman, M. Hicks, J. Cheney, and Y. Wang, 'Cyclone: A safe dialect of C,' In Proceedings of the USENIX Annual Technical Conference, pp. 275-288, June 2002