SIGSEGV after dive computer download

Thiago Macieira thiago at macieira.org
Tue Sep 17 09:24:06 UTC 2013


On terça-feira, 17 de setembro de 2013 10:40:40, Linus Torvalds wrote:
> But valgrind spits out a *lot* of error messages about bad memory
> accesses.  Most of the early ones seem to be about some strings
> allocated with "strdup()", and then subsequent 4-byte reads that
> straddle the end, which is probably fine (my guess is that something
> just does "int" accesses to find the zero byte, knowing that the
> allocation is int-aligned). So you see lots of messages like
> 
>     Invalid read of size 4
>     Address 0xea0661c is 44 bytes inside a block of size 45 alloc'd

Yep, a quick check of glibc's strlen code (even the non-assembly versions) 
shows it does multibyte loads. Those ??? could very well be inlined strlens. 
Any aligned load containing a valid byte cannot cause a segfault.

Usually, valgrind suppresses those warnings. I've only seen them with distros 
that didn't build valgrind properly (usually valgrind needs to be rebuilt 
after glibc is upgraded).

I've just checked subsurface with -style gtk and the first warning I get is the 
Marble one that is in the attached file on line 927. After that, there are 
warnings from JavaScriptCore, due to the execution of Google Maps JS.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130917/152101f5/attachment.sig>


More information about the subsurface mailing list