When I compile my C++ code with -fsanitize=address
, my software prints out a list of leaks at the time it exits. Is there a way to avoid the leaks report (I'm only interested in memory corruptions, not leaks)? I went to the page with ASAN flags page, but it doesn't look like any of those flags is a match.
You can run with export ASAN_OPTIONS=detect_leaks=0
or add a function to your application:
const char* __asan_default_options() { return "detect_leaks=0"; }
See Flags wiki for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With