> On Mar 30, 2021, at 10:35 AM, Thiago Macieira via subsurface 
> <[email protected]> wrote:
>> I wonder why I didn't find this with Valgrind. Given that my professional
>> software developer career started writing a memory debugger 27 years ago...
>> I find Valgrind frustratingly inconsistent to use.

Hmm. A little more analysis shows that I had an overly aggressive white list. 
Oops.
So yes, I can find this after all.

> Try ASan (-fsanitize=address). Compiling only the executable and not the 
> libraries (especially Qt) with ASan works most of the time, but if you need 
> more info you may need to enable that for Qt too.

Uhh, I hadn't tried using this in ... I don't know ... forever.
This is neat. And yes, it immediately finds the crash on Linux and points at 
DiveTripModelBase::reset() calling down through 
DiveListNotifier::divesSelected()
which in turn causes the stats code to access freed data.

Which is of course consistent with what Berthold said earlier.
Berthold, are you fixing this or should I take a hammer to it?

Thanks, Thiago - I love it when I learn things...

/D
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to