MantisBT - NetSurf |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0002491 | NetSurf | [All Projects] General | public | 2016-12-05 23:53 | 2020-05-27 08:17 |
|
Reporter | Chris Young | |
---|
Assigned To | kinnison | |
---|
Priority | normal | Severity | minor | Reproducibility | have not tried |
---|
Status | closed | Resolution | fixed | |
---|
Platform | Amiga | OS | AmigaOS | OS Version | 3.5 |
---|
Product Version | | |
---|
Target Version | | Fixed in Version | 3.10 | |
---|
Fixed in CI build # | |
---|
Reported in CI build # | 3794 |
---|
URL of problem page | |
---|
|
Summary | 0002491: Memory leaks in libdom |
---|
Description | I've built the Amiga frontend of NetSurf with clib's memory debugging mode. This logs memory allocations and will note when they haven't been freed.
See bug 2489 for more info.
For libdom, we have the following not freed:
src/core/string.c:101 (0000390:0000016 bytes)
src/core/string.c:105 (various sizes)
|
---|
Steps To Reproduce | This is a simple open/close NetSurf only viewing about:welcome |
---|
Additional Information | Relevant part of log:
[NetSurf] - 16 0x1164D610 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 4 0x1164DE48 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x1164E680 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 6 0x1164EEB8 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x1164F6F0 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 29 0x1164FF28 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x11650760 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 35 0x11650F98 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x116517D0 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 27 0x11652008 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x11652840 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 29 0x11653078 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x116538B0 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 37 0x116540E8 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399]
[NetSurf] - 16 0x11654920 [allocated at src/core/string.c:101, freed at stdlib_malloc.c:399]
[NetSurf] - 30 0x11655158 [allocated at src/core/string.c:105, freed at stdlib_malloc.c:399] |
---|
Tags | No tags attached. |
---|
Relationships | |
Attached Files | |
---|
Notes |
|
|
I put this down as a libdom bug, but after a quick look I think libdom is OK, and it's NetSurf not destroying the strings. |
|
|
|
looks like netsurf has some dom strings still referenced.
Right sod to track down without explicit dump code to show what they are. |
|
|
|
They won't be interned dom strings, or the wapcaplet exit iterator would list them. I'd be tempted to do a quick hack to libdom, to make it intern all strings, run with that, and have the wapcaplet iterator tell us what they are. |
|
|
|
daniel has been looking at several libdom leaks revealed by the sanitizer checks |
|
|
|
I'd like to know if this is still the case Chris? |
|
|
|
I'll rebuild it when I have time and report back. |
|
|
|
Looks like no change from previous:
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EF1C10 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 4 0x55EF25B0 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EF3270 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 6 0x55EF3C10 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EF45B0 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 29 0x55EF5270 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EF5C10 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 35 0x55EF65B0 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EC7270 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 27 0x55EC7C10 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EC85B0 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 29 0x55EC9270 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55EC9C10 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 37 0x55ECA5B0 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 16 0x55ECB270 [ allocated at src/core/string.c:101, freed at stdlib_malloc.c:424]
[Apps:Internet/NetSurf/NetSurf_debug] - 30 0x55ECBC10 [ allocated at src/core/string.c:105, freed at stdlib_malloc.c:424] |
|
|
|
I can confirm there're definitely some leaked DOM strings if I create a browser window, navigate it to about:welcome, render it, destroy it, and close the browser using Monkey. |
|
|
|
I've added support for finalising the DOM namespace strings during `netsurf_exit()` so hopefully this is resolved.
Chris: If you can take a look and let me know if we're still leaking stuff? |
|
|
|
|
|
|
Thankyou for reporting this issue.
We believe this is fixed in the 3.10 release.
If this is not the case please feel free to reopen the issue with additional details. |
|