MantisBT - LibWapcaplet
View Issue Details
0002490LibWapcaplet[All Projects] Generalpublic2016-12-05 23:472020-05-27 08:18
ReporterChris Young 
Assigned Tokinnison 
PrioritynormalSeverityminorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformAmigaOSAmigaOSOS Version3.5
Fixed in CI build #
Reported in CI build #3794
Summary0002490: Memory leaks in libwapcaplet
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 libwapcaplet, we have the following not freed:
src/libwapcaplet.c:58 (0002046:0000008 bytes)
src/libwapcaplet.c:66 (~16364 bytes)
Additional InformationRelevant part of the log:

[NetSurf] - 8 0x10814570 [allocated at src/libwapcaplet.c:58, freed at stdlib_malloc.c:399]
[NetSurf] - 16364 0x10814D7C [allocated at src/libwapcaplet.c:66, freed at stdlib_malloc.c:399]
TagsNo tags attached.
related to 0002489closed Chris Young NetSurf Memory leaks 
Attached Files

Notes
(0001954)
Chris Young   
2019-06-09 19:22   
This is still true in the current version.
(0002052)
kinnison   
2019-08-01 11:06   
This looks like the core wapcaplet context which is, indeed, never freed.

If the iterator at the end of NetSurf doesn't list any strings, then we've not leaked wapcaplet strings, just the core hash table. Short of adding a 'lwc_closedown()` type function there's no easy way to clear this.
(0002087)
kinnison   
2019-09-07 14:00   
I decided to make lwc_iterate_strings() free the global context if no strings were found. This should resolve this.
(0002243)
Vincent Sanders   
2020-05-27 08:18   
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.

Issue History
2016-12-05 23:47Chris YoungNew Issue
2016-12-05 23:48Chris YoungRelationship addedrelated to 0002489
2017-01-18 21:29Vincent SandersStatusnew => acknowledged
2019-06-09 19:22Chris YoungNote Added: 0001954
2019-08-01 11:06kinnisonAssigned To => kinnison
2019-08-01 11:06kinnisonStatusacknowledged => assigned
2019-08-01 11:06kinnisonNote Added: 0002052
2019-08-01 11:06kinnisonStatusassigned => confirmed
2019-09-07 14:00kinnisonNote Added: 0002087
2019-09-07 14:01kinnisonStatusconfirmed => resolved
2019-09-07 14:01kinnisonResolutionopen => fixed
2020-05-27 08:18Vincent SandersStatusresolved => closed
2020-05-27 08:18Vincent SandersNote Added: 0002243