On Wed, 2015-06-10 at 19:09 +0100, David Carter wrote:
> Hi,
> 
> 
> I've recently switched over to Valgrind 3.10.1 and I'm now see vast
> numbers of 'mismatched free/delete' type messages all coming from
> std::string shipped with GCC 4.8.3.
> 
> 
> I really don't believe what Valgrind is saying but I'd like to be
> certain.  Firstly, has anyone else seen this behaviour recently and
> secondly what criteria does Valgrind use to determine if a mismatch
> occurred?  Is it possible to print out more information from Valgrind
> about its decision process?
Valgrind memcheck understands 4 types of alloc functions:
malloc/new/new[]/custom
which must be freed by the corresponding free/delete/delete[]/custom
'freeing' function.

Normally, if such a mismatch error is detected, you get the allocation
stack trace and the stack trace at which the non matching freeing is
done. That should normally give enough information.

If not, you can always try to debug your program while running it under
valgrind, using gdb+vgdb.
But it is not clear to me what is missing when you have both
stacktraces.

Philippe
 




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

Reply via email to