2024-04-27 14:17 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002871NetSurf[All Projects] Generalpublic2024-04-05 16:15
ReporterxHire 
Assigned ToMichael Drake 
SeveritycrashReproducibilityalways 
StatusclosedResolutionno change required 
PlatformOSGentoo LinuxOS Version
Product Version3.11 
Target VersionFixed in Version 
Summary0002871: Netsurf-gtk crashes on start due to NULL dereference
DescriptionNetsurf-gtk crashes on start every time. Valgrind (attached) points to a NULL dereference.

First I thought the crash was related to libparserutils being updated from 0.2.4 to 0.2.5, but when I rebuild 0.2.4 (or even 0.2.5 without the big change to handling buffers), netsurf still crashes. The stacktrace now shows libhubbub, even though its version hasn’t changed when I ran system update. Still, I tried going a version down (to 0.3.7), but netsurf still crashes and the stacktrace is the same. So I’m not really sure which component is to blame.
Additional InformationI don’t know whether related, but parserutils_buffer_randomise in src/utils/buffer.c (libparserutils) contains a bug, because new chunk of memory is allocated with size `buffer->length`, however, that might be less than `buffer->allocated`, leading to incorrect memory accesses.

Otherwise, the changes made in d101b2bb6dc98050f8f1b04d9d2bfeeff5a120c7 (libparserutils) look ok to me.
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
URL of problem page
Attached Files

-Relationships
+Relationships

-Notes
xHire

~0002441

xHire (reporter)

Attaching also the latter valgrind log.
Michael Drake

~0002442

Michael Drake (administrator)

It sounds like you have various NetSurf libs installed via your linux package manager? As shared libraries?

We don't support that because we won't make any ABI stability guarantees until they hit version 1.0.0. So for now, the libraries aren't currently intended to be used in this way.

What I guess might have happened here is that the `struct parserutils_buffer` which added a new member changed the ABI of libparserutils, and any libraries using it (hubbub, libcss, etc) will need to be rebuilt against the updated libparserutils.
xHire

~0002443

xHire (reporter)

I think your guess is probably correct. I couldn’t reproduce the crash in an isolated build from git and after a recent rebuild of my system, I can’t reproduce it with system netsurf either.

Thank you for your explanation, I’ll be smarter next time. :·)
Michael Drake

~0002444

Michael Drake (administrator)

No worries, thanks for letting us know!
+Notes

-Issue History
Date Modified Username Field Change
2024-03-21 07:50 xHire New Issue
2024-03-21 07:50 xHire File Added: valgrind.log
2024-03-21 07:51 xHire File Added: libhubbub-valgrind.log
2024-03-21 07:51 xHire Note Added: 0002441
2024-04-05 15:56 Michael Drake Note Added: 0002442
2024-04-05 16:03 xHire Note Added: 0002443
2024-04-05 16:14 Michael Drake Note Added: 0002444
2024-04-05 16:15 Michael Drake Assigned To => Michael Drake
2024-04-05 16:15 Michael Drake Status new => closed
2024-04-05 16:15 Michael Drake Resolution open => no change required
+Issue History