Re: question regarding mismatching free/delete
Julian Seward <[email protected]> Mon, 17 Jun 2024 11:53:29 +0200
| Newsgroups | gmane.comp.debugging.valgrind |
|---|---|
| Message-ID | <[email protected]> |
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