Windows crash

Dirk Hohndel dirk at hohndel.org
Tue Mar 30 12:04:12 PDT 2021



> On Mar 30, 2021, at 10:35 AM, Thiago Macieira via subsurface <subsurface at subsurface-divelog.org> 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


More information about the subsurface mailing list