debugging a crash on Windows

Linus Torvalds torvalds at linux-foundation.org
Sat Jun 7 12:34:09 PDT 2014


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.

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.

          Linus


More information about the subsurface mailing list