MantisBT - NetSurf |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0002871 | NetSurf | [All Projects] General | public | 2024-03-21 07:50 | 2024-04-05 15:15 |
|
Reporter | xHire | |
---|
Assigned To | Michael Drake | |
---|
Priority | normal | Severity | crash | Reproducibility | always |
---|
Status | closed | Resolution | no change required | |
---|
Platform | | OS | Gentoo Linux | OS Version | |
---|
Product Version | 3.11 | |
---|
Target Version | | Fixed in Version | | |
---|
Fixed in CI build # | |
---|
Reported in CI build # | |
---|
URL of problem page | |
---|
|
Summary | 0002871: Netsurf-gtk crashes on start due to NULL dereference |
---|
Description | Netsurf-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 Information | I 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. |
---|
Tags | No tags attached. |
---|
Relationships | |
Attached Files | valgrind.log (256,479) 2024-03-21 07:50 https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=741&type=bug libhubbub-valgrind.log (3,219) 2024-03-21 07:51 https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=742&type=bug |
---|
Notes |
|
(0002441)
|
xHire
|
2024-03-21 07:51
|
|
Attaching also the latter valgrind log. |
|
|
|
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. |
|
|
(0002443)
|
xHire
|
2024-04-05 15:03
|
|
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. :·) |
|
|
|
No worries, thanks for letting us know! |
|