2024-11-24 00:20 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002491NetSurf[All Projects] Generalpublic2020-05-27 08:17
ReporterChris Young 
Assigned Tokinnison 
SeverityminorReproducibilityhave not tried 
StatusclosedResolutionfixed 
PlatformAmigaOSAmigaOSOS Version3.5
Product Version 
Target VersionFixed in Version3.10 
Summary0002491: Memory leaks in libdom
DescriptionI'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 ReproduceThis is a simple open/close NetSurf only viewing about:welcome
Additional InformationRelevant 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]
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #3794
URL of problem page
Attached Files

-Relationships
related to 0002489closedChris Young Memory leaks 
+Relationships

-Notes
Chris Young

~0001455

Chris Young (developer)

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.
Vincent Sanders

~0001466

Vincent Sanders (administrator)

looks like netsurf has some dom strings still referenced.

Right sod to track down without explicit dump code to show what they are.
Michael Drake

~0001480

Michael Drake (administrator)

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.
Vincent Sanders

~0001791

Vincent Sanders (administrator)

daniel has been looking at several libdom leaks revealed by the sanitizer checks
kinnison

~0001934

kinnison (administrator)

I'd like to know if this is still the case Chris?
Chris Young

~0001939

Chris Young (developer)

I'll rebuild it when I have time and report back.
Chris Young

~0001952

Chris Young (developer)

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]
kinnison

~0002088

kinnison (administrator)

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.
kinnison

~0002089

kinnison (administrator)

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?
Chris Young

~0002092

Chris Young (developer)

All looks good.
Vincent Sanders

~0002241

Vincent Sanders (administrator)

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.
+Notes

-Issue History
Date Modified Username Field Change
2016-12-05 23:53 Chris Young New Issue
2016-12-05 23:53 Chris Young Relationship added related to 0002489
2016-12-06 00:22 Chris Young Project LibDOM => NetSurf
2016-12-06 00:24 Chris Young Note Added: 0001455
2016-12-31 12:28 Vincent Sanders Note Added: 0001466
2016-12-31 12:28 Vincent Sanders Status new => acknowledged
2017-01-06 10:19 Michael Drake Note Added: 0001480
2018-07-29 10:20 Vincent Sanders Assigned To => kinnison
2018-07-29 10:20 Vincent Sanders Status acknowledged => confirmed
2018-07-29 10:20 Vincent Sanders Note Added: 0001791
2019-06-05 21:04 kinnison Note Added: 0001934
2019-06-05 21:53 Chris Young Note Added: 0001939
2019-06-05 21:53 Chris Young Assigned To kinnison => Chris Young
2019-06-09 19:07 Chris Young Note Added: 0001952
2019-06-09 19:08 Chris Young Assigned To Chris Young => kinnison
2019-09-07 14:29 kinnison Note Added: 0002088
2019-09-07 14:40 kinnison Note Added: 0002089
2019-09-08 14:19 Chris Young Note Added: 0002092
2019-09-09 13:05 kinnison Status confirmed => resolved
2019-09-09 13:05 kinnison Resolution open => fixed
2020-05-27 08:17 Vincent Sanders Status resolved => closed
2020-05-27 08:17 Vincent Sanders Fixed in Version => 3.10
2020-05-27 08:17 Vincent Sanders Note Added: 0002241
+Issue History