ANN: Memory Safety Checker ... find those pesky memory reference problems in your C code

Mar 28, 2011 2 Replies

C applications use pointers. A lot. And it is easy to make a mistake with a pointer, producing an illegal memory reference or unwanted program behavior. A real problem with finding an error with a pointer is that the damage may occur long before any application symptoms occur. For instance, one can store a value indirect through a dangling pointer, damaging memory now used for another purpose. A program crash may occur far later than the wild store, making the actual problem very difficult to find.



The C MemorySafety Checker is a tool designed to catch errors with array accesses and pointers at the moment the access is erroneous, e.g., for the example, at the moment of the wild store.



More details can be found at

formatting link



Ira Baxter, CTO Semantic Designs


cf. Valgrind

formatting link

cf. also

formatting link

Valgrind is pretty good but...

a) Doesn't catch accesses outside of arrays. b) Doesn't catch accesses outside of a field in struct. c) Doesn't catch dangling pointers into dead scopes (that storage may be in use for another function call) d) Doesn't catch dangling pointers into recycled memory. (x=3Dnew(..); free(x); y=3Dnew; /* gets same storage x had */; *x=3D /* bad news */)

Our memory safety check does catch these.

-- IDB

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required