View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002579 | NetSurf | [All Projects] General | public | 2017-12-06 14:38 | 2018-08-29 15:04 | ||||
Reporter | Felix S. | ||||||||
Assigned To | |||||||||
Severity | minor | Reproducibility | always | ||||||
Status | closed | Resolution | fixed | ||||||
Product Version | 3.7 | ||||||||
Target Version | 3.8 | Fixed in Version | 3.8 | ||||||
Summary | 0002579: Memory leak in a cache back-end | ||||||||
Description | There is a memory leak in cache code. Two allocations made in the file system backend (content/fs_backing_store.c) are apparently never disposed of: one in read_entries() and one in build_entrymap(). | ||||||||
Steps To Reproduce | This problem should be possible to detect with any memory leak detection tool. (The particular tool used to write this report was memtrail[0], chosen mainly for its low instrumentation overhead.) [0]: <https://github.com/jrfonseca/memtrail/> | ||||||||
Additional Information | Fragment of the output of memtrail report: leaked: 9,425,771B -> 64.22% (6,053,352B): calloc | -> 27.81% (2,621,440B): read_entries [./netsurf/content/fs_backing_store.c:1230] | | -> 27.81% (2,621,440B): hlcache_initialise [./netsurf/content/hlcache.c:535] | | -> 27.81% (2,621,440B): netsurf_init [./netsurf/desktop/netsurf.c:226] | | -> 27.81% (2,621,440B): main [./netsurf/frontends/gtk/gui.c:1178] | | -> 27.81% (2,621,440B): __libc_start_main [/build/glibc-mcIJEN/glibc-2.25/csu/../csu/libc-start.c:297] | | -> 27.81% (2,621,440B): _start | | | -> 22.25% (2,097,152B): build_entrymap [./netsurf/content/fs_backing_store.c:1148] | | -> 22.25% (2,097,152B): hlcache_initialise [./netsurf/content/hlcache.c:535] | | -> 22.25% (2,097,152B): netsurf_init [./netsurf/desktop/netsurf.c:226] | | -> 22.25% (2,097,152B): main [./netsurf/frontends/gtk/gui.c:1178] | | -> 22.25% (2,097,152B): __libc_start_main [/build/glibc-mcIJEN/glibc-2.25/csu/../csu/libc-start.c:297] | | -> 22.25% (2,097,152B): _start | | ... Attached patch seems to fix the problem. | ||||||||
Tags | No tags attached. | ||||||||
Fixed in CI build # | 4292 | ||||||||
Reported in CI build # | |||||||||
URL of problem page | |||||||||
Attached Files |
|
Notes | |
John-Mark Bell (administrator) 2018-01-20 16:20 |
Thanks for the report. Patch applied in master. |
Vincent Sanders (administrator) 2018-08-29 15:04 |
Thank you for your report, this has been resolved in the 3.8 release |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2017-12-06 14:38 | Felix S. | New Issue | |
2017-12-06 14:38 | Felix S. | File Added: netsurf-cache-memleak.patch | |
2018-01-20 16:20 | John-Mark Bell | Status | new => resolved |
2018-01-20 16:20 | John-Mark Bell | Resolution | open => fixed |
2018-01-20 16:20 | John-Mark Bell | Fixed in Version | => 3.8 |
2018-01-20 16:20 | John-Mark Bell | Target Version | => 3.8 |
2018-01-20 16:20 | John-Mark Bell | Steps to Reproduce Updated | View Revisions |
2018-01-20 16:20 | John-Mark Bell | Additional Information Updated | View Revisions |
2018-01-20 16:20 | John-Mark Bell | Fixed in CI build # | => 4292 |
2018-01-20 16:20 | John-Mark Bell | Note Added: 0001707 | |
2018-08-29 15:04 | Vincent Sanders | Status | resolved => closed |
2018-08-29 15:04 | Vincent Sanders | Note Added: 0001840 |