[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c

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

Ira D. Baxter

3/28/2011 8:40:00 PM

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 http://www.semdesigns.com/Products/Me...

Ira Baxter, CTO
Semantic Designs


2 Answers

Barry Briggs

3/29/2011 8:49:00 AM

0

> 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.

cf. Valgrind
http://en.wikipedia.org/wik...

cf. also
http://en.wikipedia.org/wiki/Memor...

Ira D. Baxter

3/31/2011 2:49:00 AM

0

On Mar 29, 4:48 am, Noob <r...@127.0.0.1> wrote:
> > C applications use pointers.  A lot.  And it is easy to make a
> > mistake with a pointer, producing an illegalmemoryreference or
> > unwanted program behavior.
>
> cf. Valgrindhttp://en.wikipedia.org/wik...
>
> cf. alsohttp://en.wikipedia.org/wiki/Memor...

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=new(..); free(x); y=new; /* gets same storage x had */; *x= /*
bad news */)

Our memory safety check does catch these.

-- IDB