When compiled with address sanitizer, there is a memory leak against all the examples in project's examples subdirectory, except the example.toml case, which cases a NULL pointer dereference (#23 ). Sample output against ./main -t ./examples/hard_example.toml.
=================================================================
==17547==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 3 object(s) allocated from:
#0 0x4d2478 in __interceptor_malloc (/home/hongxu/FOT/test_c/libtoml/libtoml-asan/main+0x4d2478)
#1 0x7f717c4343fa in make_stack_item /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:724:8
#2 0x7f717c430c12 in toml_parse /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:315:40
#3 0x50c3a9 in main /home/hongxu/FOT/test_c/libtoml/libtoml-asan/main.c:120:8
#4 0x7f71796e782f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
Direct leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x4d2478 in __interceptor_malloc (/home/hongxu/FOT/test_c/libtoml/libtoml-asan/main+0x4d2478)
#1 0x7f717c4343fa in make_stack_item /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:724:8
#2 0x7f717c431813 in toml_parse /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:406:13
#3 0x50c3a9 in main /home/hongxu/FOT/test_c/libtoml/libtoml-asan/main.c:120:8
#4 0x7f71796e782f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
Indirect leak of 64 byte(s) in 2 object(s) allocated from:
#0 0x4d2478 in __interceptor_malloc (/home/hongxu/FOT/test_c/libtoml/libtoml-asan/main+0x4d2478)
#1 0x7f717c4343fa in make_stack_item /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:724:8
#2 0x7f717c431813 in toml_parse /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:406:13
#3 0x50c3a9 in main /home/hongxu/FOT/test_c/libtoml/libtoml-asan/main.c:120:8
#4 0x7f71796e782f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
Indirect leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x4d2478 in __interceptor_malloc (/home/hongxu/FOT/test_c/libtoml/libtoml-asan/main+0x4d2478)
#1 0x7f717c4343fa in make_stack_item /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:724:8
#2 0x7f717c42e276 in toml_parse /home/hongxu/FOT/test_c/libtoml/libtoml-asan/toml_parse.rl:759:33
#3 0x50c3a9 in main /home/hongxu/FOT/test_c/libtoml/libtoml-asan/main.c:120:8
#4 0x7f71796e782f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
When compiled with address sanitizer, there is a memory leak against all the examples in project's
examplessubdirectory, except theexample.tomlcase, which cases a NULL pointer dereference (#23 ). Sample output against./main -t ./examples/hard_example.toml.