liblouis / liblouisutdml

An open-source library providing complete braille transcription services for xml, html and text documents
http://liblouis.io
GNU General Public License v3.0
24 stars 16 forks source link

testsuite memory leaks #77

Closed sthibaul closed 2 years ago

sthibaul commented 2 years ago

Hello,

Building with

CFLAGS="-fsanitize=leak -g" ./configure
make
LSAN_OPTIONS="fast_unwind_on_malloc=0" make check

Shows some memory leaks such as

==1532626==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 6 byte(s) in 3 object(s) allocated from:
    #0 0x7f382b747545 in __interceptor_malloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:75
    #1 0x7f382b53742a in xmlStrdup (/lib/x86_64-linux-gnu/libxml2.so.2+0xd042a)
    #2 0x7f382b664e7f in set_sem_attr /home/samy/brl/translation/liblouisutdml.git/liblouisutdml/semantics.c:1181
    #3 0x7f382b65c807 in examine_document /home/samy/brl/translation/liblouisutdml.git/liblouisutdml/examine_document.c:48
    #4 0x7f382b65c9c7 in examine_document /home/samy/brl/translation/liblouisutdml.git/liblouisutdml/examine_document.c:95
    #5 0x7f382b65c9c7 in examine_document /home/samy/brl/translation/liblouisutdml.git/liblouisutdml/examine_document.c:95
    #6 0x7f382b65d252 in processXmlDocument /home/samy/brl/translation/liblouisutdml.git/liblouisutdml/liblouisutdml.c:170
    #7 0x7f382b65d68d in lbu_translateFile /home/samy/brl/translation/liblouisutdml.git/liblouisutdml/liblouisutdml.c:283
    #8 0x55d3f68f9e9c in main /home/samy/brl/translation/liblouisutdml.git/tools/file2brl.c:351
    #9 0x7f382b2b17fc in __libc_start_main ../csu/libc-start.c:332
    #10 0x55d3f68f9249 in _start (/home/samy/ens/projet/1/translation/liblouisutdml.git/tools/.libs/file2brl+0x2249)

it should be possible to fix them.

Samuel