LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2011, 08:16 AM   #1
rainman1985_2010
Member
 
Registered: Oct 2010
Posts: 47

Rep: Reputation: 0
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?

Last edited by rainman1985_2010; 11-12-2011 at 08:36 AM.
 
Old 11-13-2011, 12:17 AM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
Yes. Valgrind is amazing. Just run it and see what it spits out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB devices stop detecting (or un-detecting). Mleahy Linux - Desktop 1 07-31-2011 02:08 AM
can a dangling pointer exist in java??? silverlander Programming 18 11-16-2008 10:38 AM
Problem with crone - dangling job gstasica Linux - General 0 11-10-2004 09:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration