Created attachment 1505088 [details] ./confuse_test POC0 version: libconfuse3.2.2 Summary: There are lots of memory leak at libconfuse. Description: The asan debug is as follows: $./confuse_test POC0 ================================================================= ==56120==ERROR: LeakSanitizer: detected memory leaks Direct leak of 72 byte(s) in 1 object(s) allocated from: #0 0x7f5940f43b49 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98b49) #1 0x7f5940c9bdac in cfg_init /home/company/real_sanitize/libconfuse-master/src/confuse.c:1579 Indirect leak of 3168 byte(s) in 3 object(s) allocated from: #0 0x7f5940f43b49 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98b49) #1 0x7f5940c96679 in cfg_dupopt_array /home/company/real_sanitize/libconfuse-master/src/confuse.c:485 Indirect leak of 227 byte(s) in 24 object(s) allocated from: #0 0x7f5940f439aa in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x989aa) #1 0x7f5940950429 in __strdup (/lib/x86_64-linux-gnu/libc.so.6+0x8b429) Indirect leak of 72 byte(s) in 9 object(s) allocated from: #0 0x7f5940f43b49 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98b49) #1 0x7f5940c9569f in cfg_addval /home/company/real_sanitize/libconfuse-master/src/confuse.c:463 Indirect leak of 72 byte(s) in 5 object(s) allocated from: #0 0x7f5940f43d2a in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98d2a) #1 0x7f5940c95646 in cfg_addval /home/company/real_sanitize/libconfuse-master/src/confuse.c:458 Indirect leak of 46 byte(s) in 1 object(s) allocated from: #0 0x7f5940f439aa in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x989aa) #1 0x7f5940950429 in __strdup (/lib/x86_64-linux-gnu/libc.so.6+0x8b429) #2 0x36303a6769732c37 (<unknown module>) Indirect leak of 5 byte(s) in 1 object(s) allocated from: #0 0x7f5940f439aa in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x989aa) #1 0x7f5940c9bdc2 in cfg_init /home/company/real_sanitize/libconfuse-master/src/confuse.c:1583
I don't know what to do with the attachment. Additionally, wouldn't this be better submitted upstream?
Created attachment 1505508 [details] ./confuse_test POC0
Created attachment 1505509 [details] ./confuse_test POC0