Programs which manipulate pointers are hard to debug. Pointer analysis
algorithms (originally aimed at optimizing compilers) may provide som
e remedy by identifying potential errors such as dereferencing NULL po
inters by statically analyzing the behavior of programs on all their i
nput data. Our goal is to identify the ''core program analysis techniq
ues'' that can be used when developing realistic tools which detect me
mory errors at compile time without generating too many false alarms.
Our preliminary experience indicates that the following techniques are
necessary: (i) finding aliases between pointers, (ii) flow sensitive
techniques that account for the program control flow constructs, (iii)
partial interpretation of conditional statements, (iv) analysis of th
e relationships between pointers, and sometimes (iv) analysis of the u
nderlying data structures manipulated by the C program. We show that a
combination of these techniques can yield better results than those a
chieved by state of the art tools. Yet it is not clear to us whether o
ur ideas are applicable to large programs.