-   Programming (
-   -   Detecting dangling pointers (

rainman1985_2010 11-12-2011 08:16 AM

Detecting dangling pointers
Hi, all:-)
Does anyone know how to use valgrind to detect the use of dangling pointers? And can valgrind detect all kinds of dangling pointers? For example, assume that there are two pointers pointing to the same address, one has been free'd, while the other one is still used to write to that memory location. Can valgrind detect this kind of error?

tuxdev 11-13-2011 12:17 AM

Yes. Valgrind is amazing. Just run it and see what it spits out.

All times are GMT -5. The time now is 11:57 PM.