debugging a crash on Windows

Dirk Hohndel dirk at hohndel.org
Sat Jun 7 13:05:32 PDT 2014


On Sat, Jun 07, 2014 at 12:34:09PM -0700, Linus Torvalds wrote:
> On Sat, Jun 7, 2014 at 12:19 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> > Ouch. Oops. Bad.
> > I'm surprised no one got bitten by this before. It's odd it showed off so
> > much more dramatically on Windows, I guess.
> 
> Well, you might get bitten in much more subtle ways - not with crashes
> and corruption, but with the 'cns' value overwriting the three bytes
> around it, and clearing them!
> 
> So you might have silent data loss.

So that means that people who have used Subsurface on their XML data files
lately might do well to check against their backups to make sure they
didn't loose anything.

> Note that "load-git" has some of the same kind of "cast pointers to
> 'void *'" issue to relax the type system (for the "for_each_line()"
> and "match_action()" helpers), but the git loading only uses it on
> whole structures (dive, sample, dive computer) and so isn't affected
> by the individual entries changing type. So the git save format should
> be safe, even if it has a subset of this kind of thing. Somebody
> should double-check me, though.

My git history for my data file shows nothing suspicious.

I will do a code review on your patch and on the load git case.

Thanks

/D


More information about the subsurface mailing list