Hi,
Is there a way to detect ALL dangling pointers (at exit) in valgrind ?

e.g.

char* globalVar;

void main()
{
   char* z1 = new char[10];
   char* z2 = z1;
   globalVar = z2;

   delete[] z1;

}

At exit of the program say that "globalVar" holds a pointer to a freed memory.


------------------------------------------------------------------------------------------------------------
 
Please read these warnings and restrictions:

This e-mail transmission is strictly confidential and intended solely for the 
ordinary user of the e-mail address to which it was addressed. It may contain 
legally privileged and/or CONFIDENTIAL information. 

The unauthorised use, disclosure, distribution and/or copying of this e-mail or 
any information it contains is prohibited and could, in certain circumstances, 
constitute a criminal offence.

If you have received this e-mail in error or are not an intended recipient 
please inform the London Stock Exchange immediately by return e-mail or 
telephone 020 7797 1000.

LSEG may collect, process and retain your personal information for its business 
purposes. For more information please see our Privacy Policy. 

We advise that in keeping with good computing practice the recipient of this 
e-mail should ensure that it is virus free. We do not accept responsibility for 
any virus that may be transferred by way of this e-mail. 

E-mail may be susceptible to data corruption, interception and unauthorised 
amendment, and we do not accept liability for any such corruption, interception 
or amendment or any consequences thereof. 

Calls to the London Stock Exchange may be recorded to enable the Exchange to 
carry out its regulatory responsibilities.

London Stock Exchange plc
10 Paternoster Square
London 
EC4M 7LS
Registered in England and Wales No 2075721 
 
------------------------------------------------------------------------------------------------------------

_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to