[Interest] Debugging a double dealloc
Michael Jackson
mike.jackson at bluequartz.net
Wed Sep 23 15:08:11 CEST 2020
AddressSanitizer. (Except on macOS it will not find memory leaks) You should be able to find the double free quite quickly. You do NOT Have to rebuild Qt with the address sanitizer flags, just your own codes. We just got done using ASAN on our own code base and it was able to pinpoint the same kind of issue. The issue was in our code but it didn't die until deep inside of Qt code which was never helpful. I'm 100% behind ASAN as an excellent code quality tool. We now have a nightly CI build with ASAN running to help find new codes that might have the same issues as before.
--
Mike Jackson
On 9/23/20, 8:56 AM, "Interest on behalf of Ben Haller via Interest" <interest-bounces at qt-project.org on behalf of interest at qt-project.org> wrote:
Thanks Giuseppe; this looks very interesting. I’d love to be able to run Valgrind.
Thanks also to Mitch; I see your email now, and it also looks very useful. To avoid spamming the list with thank-yous, I’ll just say in advance, thanks to all others who might respond with helpful suggestions. :->
Cheers,
-B.
Benjamin C. Haller
Messer Lab
Cornell University
> On Sep 23, 2020, at 8:41 AM, Giuseppe D'Angelo via Interest <interest at qt-project.org> wrote:
>
> Il 23/09/20 14:08, Ben Haller via Interest ha scritto:
>> Thanks for the suggestion. However, this problem is only on macOS, and Valgrind doesn’t appear to run on any macOS later than 10.12 (“preliminary” support for 10.13, according to their website; I’m not sure what that means). I’m on macOS 10.15.6, and I’m using Qt 5.14.2 which has a minimum macOS version of 10.13, so Valgrind seems to be a no-go for at least one reason, perhaps two reasons (depending on “preliminary”).
>
> There is a fork of Valgrind to support more modern macOS versions
>
> https://github.com/LouisBrunner/valgrind-macos/
>
> (Note: never used it myself, not a mac user).
>
> Another option is getting a recent Clang version and rebuilding Qt and your app with AddressSanitizer.
>
> HTH,
>
> --
> Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest
More information about the Interest
mailing list