mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 02:59:07 +08:00
Suppress some LeakSanitizer errors in unit tests
The fontconfig library has some (intentional) memory leaks which must be suppressed for unit tests with the LeakSanitizer. This fixes the issues #3156 and #3157. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
ac116d1b28
commit
5eb5e6ea23
@ -15,6 +15,9 @@ TESTING_DIR=$(shell cd $(top_srcdir) && pwd)/test/testing
|
||||
# (using submodule test).
|
||||
TESTDATA_DIR=$(shell cd $(top_srcdir) && pwd)/test/testdata
|
||||
|
||||
# Suppress some memory leaks reported by LeakSanitizer.
|
||||
export LSAN_OPTIONS=suppressions=$(top_srcdir)/unittest/tesseract_leaksanitizer.supp
|
||||
|
||||
AM_CPPFLAGS += -DTESSBIN_DIR="\"$(abs_top_builddir)\""
|
||||
AM_CPPFLAGS += -DLANGDATA_DIR="\"$(LANGDATA_DIR)\""
|
||||
AM_CPPFLAGS += -DTESSDATA_DIR="\"$(TESSDATA_DIR)\""
|
||||
|
9
unittest/tesseract_leaksanitizer.supp
Normal file
9
unittest/tesseract_leaksanitizer.supp
Normal file
@ -0,0 +1,9 @@
|
||||
# Suppress memory leaks.
|
||||
# Use with LSAN_OPTIONS=suppressions=tesseract_lsan.supp
|
||||
leak:FcPatternObjectAddWithBinding
|
||||
leak:FcPatternObjectInsertElt
|
||||
leak:FcValueListAppend
|
||||
leak:FcValueListDuplicate
|
||||
leak:FcValueListPrepend
|
||||
leak:IA__FcLangSetCreate
|
||||
leak:IA__FcValueSave
|
Loading…
Reference in New Issue
Block a user