Friday, 1 December 2017

Re: Thanks for Netsurf and few comments

Forwarded to dev list.
Mathias please join the netsurf-dev list and continue discussion there.

Thanks
Chris

On 1 December 2017 22:06:58 GMT+00:00, Mathias Parnaudeau <mathias.p@wanadoo.fr> wrote:
>Hi Chris
>
>First, I would like to thank you because I installed Netsurf on my
>Amiga
>machines and I think it's a smart application. I like to use it, it is
>improved at each new release and is quite fast browsing.
>
>Then, you know, I am a developer and I like quality software, including
>
>things like continuous integration, static code analyzers, ... and I
>have to say I am impressed by Netsurf for all what is done in this
>area.
>That's not common.
>
>About that, I like to use the compiler sanitizers that really help to
>find problems / bugs at execution.
>
>So I compiled Netsurf on Linux with:
>
>make CC="gcc -fsanitize=undefined,address"
>
>I have to say I did not find easily where to modify CFLAGS and if I was
>
>forced or not to modify one or several makefiles.
>
>Anyway, compiling like that provides instrumented code that checks some
>
>errors. If I run Netsurf and then I quit it, I get:
>
>
>content/handlers/javascript/duktape/duktape.c:52791:6: runtime error:
>load of misaligned address 0x61400000b7cf for type 'duk_uint32_t',
>which
>requires 4 byte alignment
>0x61400000b7cf: note: pointer points here
> 02 00 00 00 05  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 00 00
>
>00 00 00 00 00 00  00 00 00
>              ^
>src/libnsbmp.c:287:43: runtime error: shift exponent 32 is too large
>for
>32-bit type 'int'
>src/libnsbmp.c:569:64: runtime error: left shift of 150 by 24 places
>cannot be represented in type 'int'
>src/libnsbmp.c:71:88: runtime error: left shift of 150 by 24 places
>cannot be represented in type 'int'
>src/parse/properties/utils.c:889:15: runtime error: left shift of 255
>by
>24 places cannot be represented in type 'int'
>/home/mathias/Sources/netsurf-all-3.7/libcss/src/select/bloom.h:63:21:
>runtime error: left shift of 1 by 31 places cannot be represented in
>type 'int'
>
>=================================================================
>==22287==ERROR: LeakSanitizer: detected memory leaks
>
>Direct leak of 3145728 byte(s) in 1 object(s) allocated from:
>     #0 0x7fc36b8c1ed0 in calloc
>(/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0)
>     #1 0x55a757175395 in read_entries content/fs_backing_store.c:1229
>     #2 0x55a757175395 in initialise content/fs_backing_store.c:1556
>     #3 0x55a75787f977
>(/home/mathias/Sources/netsurf-all-3.7/netsurf/nsgtk+0x13a2977)
>
>...
>
>SUMMARY: AddressSanitizer: 5300121 byte(s) leaked in 1958
>allocation(s).
>
>Leaks could also certainly be found by valgrind (not used looking at
>Jenkins jobs).
>
>
>If I start and click on the CNN link and thenk I quit, I get (as part
>of
>the output):
>
>src/libnsbmp.c:287:43: runtime error: shift exponent 32 is too large
>for
>32-bit type 'int'
>src/libnsbmp.c:569:64: runtime error: left shift of 150 by 24 places
>cannot be represented in type 'int'
>src/libnsbmp.c:71:88: runtime error: left shift of 150 by 24 places
>cannot be represented in type 'int'
>src/parse/properties/utils.c:889:15: runtime error: left shift of 255
>by
>24 places cannot be represented in type 'int'
>/home/mathias/Sources/netsurf-all-3.7/libcss/src/select/bloom.h:63:21:
>runtime error: left shift of 1 by 31 places cannot be represented in
>type 'int'
>src/utils/utils.c:130:18: runtime error: left shift of negative value
>-1
>/home/mathias/Sources/netsurf-all-3.7/libcss/src/select/bloom.h:63:21:
>runtime error: left shift of 1 by 31 places cannot be represented in
>type 'int'
>src/parse/properties/utils.c:655:16: runtime error: left shift of 191
>by
>24 places cannot be represented in type 'int'
>src/libnsbmp.c:848:54: runtime error: left shift of 255 by 24 places
>cannot be represented in type 'int'
>render/layout.c:1343:32: runtime error: negation of -2147483648 cannot
>be represented in type 'int [4]'; cast to an unsigned type to negate
>this value to itself
>
>
>So maybe you (or the team) could use these useful sanitizers to help
>finding bugs.
>
>Let me know if you prefer me to create a ticket in the bugtracker.
>
>
>A last comment: looking for your email in os4depot, I've just noticed
>that the latest version there is 3.6.
>
>
>Regards,
>
>Mathias

No comments:

Post a Comment