tests failed under address sanitizer
Linux x64, clang.
========================================
libbsd 0.10.0: test/test-suite.log
========================================
# TOTAL: 22
# PASS: 19
# SKIP: 0
# XFAIL: 0
# FAIL: 3
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: fgetln
============
=================================================================
==92616==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 512 byte(s) in 32 object(s) allocated from:
#0 0x55710e8f1cce in reallocarray (/home/mpech/libbsd/test/.libs/lt-fgetln+0xc1cce)
#1 0x55710e927377 in test_fgetln_multi /home/mpech/libbsd/test/fgetln.c:100:20
#2 0x55710e926e8f in main /home/mpech/libbsd/test/fgetln.c:207:2
#3 0x7face8ea5022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
Direct leak of 512 byte(s) in 32 object(s) allocated from:
#0 0x55710e8f1cce in reallocarray (/home/mpech/libbsd/test/.libs/lt-fgetln+0xc1cce)
#1 0x55710e927ff6 in test_fgetwln_multi /home/mpech/libbsd/test/fgetln.c:162:20
#2 0x55710e927b02 in test_fgetwln /home/mpech/libbsd/test/fgetln.c:200:2
#3 0x55710e926e94 in main /home/mpech/libbsd/test/fgetln.c:208:2
#4 0x7face8ea5022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
Indirect leak of 384 byte(s) in 32 object(s) allocated from:
#0 0x55710e8f1649 in malloc (/home/mpech/libbsd/test/.libs/lt-fgetln+0xc1649)
#1 0x7face8f27412 in wcsdup (/usr/lib/libc.so.6+0xa9412)
Indirect leak of 96 byte(s) in 32 object(s) allocated from:
#0 0x55710e86f259 in strdup (/home/mpech/libbsd/test/.libs/lt-fgetln+0x3f259)
#1 0x55710e9272e5 in test_fgetln_multi /home/mpech/libbsd/test/fgetln.c:97:9
#2 0x55710e926e8f in main /home/mpech/libbsd/test/fgetln.c:207:2
#3 0x7face8ea5022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
SUMMARY: AddressSanitizer: 1504 byte(s) leaked in 128 allocation(s).
FAIL fgetln (exit status: 1)
FAIL: funopen
=============
=================================================================
==92707==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x555c8ec24619 in malloc (/home/mpech/libbsd/test/.libs/lt-funopen+0xc0619)
#1 0x7f9705bd0c25 in funopen (/home/mpech/libbsd/src/.libs/libbsd.so.0+0x15c25)
#2 0x555c8ec5a2cb in main /home/mpech/libbsd/test/funopen.c:139:7
#3 0x7f9705840022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
Direct leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x555c8ec24619 in malloc (/home/mpech/libbsd/test/.libs/lt-funopen+0xc0619)
#1 0x7f9705bd0c25 in funopen (/home/mpech/libbsd/src/.libs/libbsd.so.0+0x15c25)
#2 0x555c8ec5a48f in main /home/mpech/libbsd/test/funopen.c:154:7
#3 0x7f9705840022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
Direct leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x555c8ec24619 in malloc (/home/mpech/libbsd/test/.libs/lt-funopen+0xc0619)
#1 0x7f9705bd0c25 in funopen (/home/mpech/libbsd/src/.libs/libbsd.so.0+0x15c25)
#2 0x555c8ec5a122 in main /home/mpech/libbsd/test/funopen.c:126:7
#3 0x7f9705840022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
SUMMARY: AddressSanitizer: 120 byte(s) leaked in 3 allocation(s).
FAIL funopen (exit status: 1)
FAIL: setmode
=============
=================================================================
==92878==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x562a694b7c8e in reallocarray (/home/mpech/libbsd/test/.libs/lt-setmode+0xc0c8e)
#1 0x7fca350c3858 in setmode (/home/mpech/libbsd/src/.libs/libbsd.so.0+0x52858)
#2 0x562a694ec885 in main /home/mpech/libbsd/test/setmode.c:37:2
#3 0x7fca34cf6022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x562a694b7c8e in reallocarray (/home/mpech/libbsd/test/.libs/lt-setmode+0xc0c8e)
#1 0x7fca350c3858 in setmode (/home/mpech/libbsd/src/.libs/libbsd.so.0+0x52858)
#2 0x562a694ec83d in main /home/mpech/libbsd/test/setmode.c:35:2
#3 0x7fca34cf6022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
SUMMARY: AddressSanitizer: 128 byte(s) leaked in 2 allocation(s).
FAIL setmode (exit status: 1)