GNOME Bugzilla – Bug 599888
Unfreed memory xmlRMutex
Last modified: 2021-07-05 13:25:31 UTC
xmlReaderForFile allocates memory that is not freed. xmlCleanupParser and xmlCleanupThreads doesn't seem to do the job. valgrind output: ==16841== ==16841== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 1) ==16841== malloc/free: in use at exit: 84 bytes in 1 blocks. ==16841== malloc/free: 3,549 allocs, 3,548 frees, 704,902 bytes allocated. ==16841== For counts of detected errors, rerun with: -v ==16841== searching for pointers to 1 not-freed blocks. ==16841== checked 186,236 bytes. ==16841== ==16841== 84 bytes in 1 blocks are still reachable in loss record 1 of 1 ==16841== at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==16841== by 0x411B932: xmlNewRMutex (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x417A278: xmlDictCreate (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x40A0922: xmlInitParserCtxt (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x40A0BA1: xmlNewParserCtxt (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x40A52DD: xmlCreatePushParserCtxt (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x416085B: xmlNewTextReader (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x4160C93: xmlNewTextReaderFilename (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x4160D51: xmlReaderForFile (in /usr/lib/libxml2.so.2.6.32) ==16841== by 0x804D2F0: open_zonelist_file (zonelistparser.c:68) ==16841== by 0x804D04A: zonelist_read (zonelist.c:106) ==16841== by 0x804A852: engine_setup (engine.c:261) ==16841== ==16841== LEAK SUMMARY: ==16841== definitely lost: 0 bytes in 0 blocks. ==16841== possibly lost: 0 bytes in 0 blocks. ==16841== still reachable: 84 bytes in 1 blocks. ==16841== suppressed: 0 bytes in 0 blocks.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.