Debugging via Run-Time Type Checking
Alexey Loginov, Suan Hsi Yong, Susan Horwitz, and Thomas Reps
This paper describes the design and implementation of a tool for C
programs that provides run-time checks based on type information. The
tool instruments a program to monitor the type stored in each memory
location. Whenever a value is written into a location, the location's
run-time type tag is updated to match the type of the value. Also,
the location's static type is compared with the value's type;
if there is a mismatch, a warning message is issued. Whenever the value
in a location is used, its run-time type tag is checked, and if the type
is inappropriate in the context in which the value is being used, an
error message is issued.
The tool has been used to pinpoint the cause of bugs in several Solaris
utilities and Olden benchmarks, usually providing information that is
succinct and precise.
(Click here to access the paper:
PostScript,
PDF.)
University of Wisconsin