skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Lightweight runtime checking of C programs with RTC

Journal Article · · Computer Languages, Systems & Structures
 [1];  [2]; ORCiD logo [3];  [4];  [1]
  1. Univ. of Alabama at Birmingham, Birmingham, AL (United States)
  2. Matlab (United States)
  3. North Carolina State Univ., Raleigh, NC (United States)
  4. Lawrence Livermore National Lab. (LLNL), Livermore, CA (United States)

The C Programming Language is known for being an efficient language that can be compiled on almost any architecture and operating system. However the absence of dynamic safety checks and a relatively weak type system allows programmer oversights that are hard to spot. In this paper, we present RTC, a runtime monitoring tool that instruments unsafe code and monitors the program execution. RTC is built on top of the ROSE compiler infrastructure. RTC finds memory bugs and arithmetic overflows and underflows, and run-time type violations. Most of the instrumentations are directly added to the source file and only require a minimal runtime system. As a result, the instrumented code remains portable. In tests against known error detection benchmarks, RTC found 98% of all memory related bugs and had zero false positives. Finally, in performance tests conducted with well known algorithms, such as binary search and MD5, we determined that our tool has an average run-time overhead rate of 9.7× and memory overhead rate of 3.5×.

Research Organization:
Lawrence Livermore National Laboratory (LLNL), Livermore, CA (United States)
Sponsoring Organization:
USDOE National Nuclear Security Administration (NNSA)
Grant/Contract Number:
AC52-07NA27344
OSTI ID:
1477830
Report Number(s):
LLNL-JRNL-748157; 933309
Journal Information:
Computer Languages, Systems & Structures, Vol. 45, Issue C; ISSN 1477-8424
Publisher:
ElsevierCopyright Statement
Country of Publication:
United States
Language:
English
Citation Metrics:
Cited by: 3 works
Citation information provided by
Web of Science

References (26)

Efficient detection of all pointer and array access errors journal June 1994
NDSeq conference June 2011
Run-Time Type Checking for Binary Programs
  • Burrows, Michael; Freund, Stephen N.; Wiener, Janet L.
  • Compiler Construction: 12th International Conference, CC 2003, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2003, Warsaw, Poland, April 7-11, 2003, Proceedings https://doi.org/10.1007/3-540-36579-6_7
book January 2003
Flexible Hardware Acceleration for Instruction-Grain Program Monitoring conference June 2008
Common specification language for static and dynamic analysis of C programs conference March 2013
Hardbound
  • Devietti, Joe; Blundell, Colin; Martin, Milo M. K.
  • Proceedings of the 13th international conference on Architectural support for programming languages and operating systems https://doi.org/10.1145/1346281.1346295
conference March 2008
Butterfly analysis
  • Goodstein, Michelle L.; Vlachos, Evangelos; Chen, Shimin
  • Proceedings of the fifteenth International Conference on Architectural support for programming languages and operating systems https://doi.org/10.1145/1736020.1736050
conference March 2010
On the probability distribution of faults in complex software systems journal February 2015
Memory-safe Execution of C on a Java VM conference July 2015
Fast as a shadow, expressive as a tree conference April 2015
Runtime Verification with Particle Filtering book January 2013
An Optimized Memory Monitoring for Runtime Assertion Checking of C Programs book January 2013
Predator conference February 2014
The Importance of Run-Time Error Detection book January 2010
Accelerating Data Race Detection Utilizing On-Chip Data-Parallel Cores book January 2013
SigRace conference June 2009
WatchdogLite conference February 2014
SoftBound
  • Nagarakatte, Santosh; Zhao, Jianzhou; Martin, Milo M. K.
  • Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation https://doi.org/10.1145/1542476.1542504
conference June 2009
CCured: type-safe retrofitting of legacy software journal May 2005
How to shadow every byte of memory used by a program conference June 2007
Valgrind: a framework for heavyweight dynamic binary instrumentation journal June 2007
CDSchecker journal October 2013
Array bounds check elimination in the context of deoptimization journal March 2009
An efficient and backwards-compatible transformation to ensure memory safety of C programs journal October 2004
Finding and understanding bugs in C compilers conference January 2011
ConSeq
  • Zhang, Wei; Lim, Junghee; Olichandran, Ramya
  • Proceedings of the sixteenth international conference on Architectural support for programming languages and operating systems https://doi.org/10.1145/1950365.1950395
conference March 2011

Cited By (1)

A Taxonomy for Classifying Runtime Verification Tools book January 2018