bundlex nifs and libasan

Is it anyone build nifs with libasan support? Even if I put compiler_flags ["-fno-omit-frame-pointer -fsanitize=address"] it doesn't detect leaks I intentionally left in nif code. I run elixir with ERL_EXEC="cerl" and set -asan option for vm and erlang is running with address_sanitizer flag.
1 Reply
spscream
spscreamOP9mo ago
e.g. for ex_dtls it found some leak, maybe false positive:
#0 0x7f319eb1fa57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f3190536ccf in export_keying_material /home/amalaev/work/sip_trunk/deps/ex_dtls/c_src/ex_dtls/dtls.c:96

-----------------------------------------------------
Suppressions used:
count bytes template
70 945280 sys_thread_init_signal_stack
-----------------------------------------------------

SUMMARY: AddressSanitizer: 10002 byte(s) leaked in 171 allocation(s).
#0 0x7f319eb1fa57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f3190536ccf in export_keying_material /home/amalaev/work/sip_trunk/deps/ex_dtls/c_src/ex_dtls/dtls.c:96

-----------------------------------------------------
Suppressions used:
count bytes template
70 945280 sys_thread_init_signal_stack
-----------------------------------------------------

SUMMARY: AddressSanitizer: 10002 byte(s) leaked in 171 allocation(s).
but for my plugin I got no leaks found even if I put it intentionally
Want results from more Discord servers?
Add your server