diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-03-31 08:30:58 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-03-31 08:30:58 +0000 |
| commit | 27c52fb4e38278c381a8d2e58f239cec57249a33 (patch) | |
| tree | 48ebc25a7b2758dc2c3bba8b53d025c814befc80 /tests | |
| parent | term: protect against integer overflow when accumulating scroll damage (diff) | |
test: config: call FcIni() + FcFini()
Some of the config options we’re testing result in calls to FontConfig
APIs. Without calling FcIni()+FcFini(), we leak memory:
Direct leak of 768 byte(s) in 3 object(s) allocated from:
#0 0x7f7e95cbfa89 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f7e95bd1fe5 (/usr/lib/libfontconfig.so.1+0x20fe5)
Indirect leak of 96 byte(s) in 3 object(s) allocated from:
#0 0x7f7e95cbf411 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77
#1 0x7f7e95bd63fd (/usr/lib/libfontconfig.so.1+0x253fd)
Indirect leak of 19 byte(s) in 2 object(s) allocated from:
#0 0x7f7e95c72faa in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7f7e95bd1898 in FcValueSave (/usr/lib/libfontconfig.so.1+0x20898)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-config.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test-config.c b/tests/test-config.c index 6b44e9c2..4736a46b 100644 --- a/tests/test-config.c +++ b/tests/test-config.c @@ -1304,6 +1304,7 @@ test_section_tweak(void) int main(int argc, const char *const *argv) { + FcInit(); log_init(LOG_COLORIZE_AUTO, false, 0, LOG_CLASS_ERROR); test_section_main(); test_section_bell(); @@ -1325,5 +1326,6 @@ main(int argc, const char *const *argv) test_section_environment(); test_section_tweak(); log_deinit(); + FcFini(); return 0; } |
