Thanks for the reply Julian.

Does that mean that you fully disable Valgrind to report on any potential 
mismatching frees? Isn't that robbing you of the ability to get at least 
notified about potential issues to that regard?

Cheers,
Thomas
________________________________
From: Julian Seward <jseward.t...@gmail.com>
Sent: Monday, June 17, 2024 11:53 AM
To: Thomas Wollenzin <wolle...@msn.com>; valgrind-users@lists.sourceforge.net 
<valgrind-users@lists.sourceforge.net>
Subject: Re: [Valgrind-users] question regarding mismatching free/delete

On 17/06/2024 10:45, Thomas Wollenzin wrote:

> Could it be that Valgrind can get confused and not resolve the overloaded 
> operators correctly?

This can happen as a result of "differential inlining".  What I mean is, you
have `new` calls `malloc` and `delete` calls `free`, and the definitions of
`malloc` and `free` are visible to the compiler (maybe you defined your own
wrappers for them).  Then, if `malloc` is inlined into `new` but `free` is
not inlined into `delete`, or vice versa, then you will get these reports.

I have this a lot when running Firefox on Valgrind, so I run with
--show-mismatched-frees=no.

J

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

Reply via email to