Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22024

What should I fix when Address Sanitizer says detect_leaks is not supported on this platform?

$
0
0

I'm using Clang to compile my project, on x86_64 OS X(MacOS 10.15.5 Catalina).

I want to identify exactly from which file, which function, which line causes memory leaks. I am trying to use Address Sanitizer, specifically Leak Sanitizer.

Here are flags that I'm using when compiling:

-Wall -Wextra -flto -O3 -march=native -ffast-math -fsanitize=address

It successfully compiles. However, when I try to use run-time flag ASAN_OPTIONS=detect_leaks=1 in order to enable Leak Sanitizer, I see the following error:

==26454==AddressSanitizer: detect_leaks is not supported on this platform.Abort trap: 6

What am I doing wrong? How could I fix this?

Or, is there another good alternative to a Valgrind? Valgrind doesn't work for me because 1)I'm using the MacOS Catalina, 2)My program runs with an infinite loop. If I'm right, Valgrind displays messages after exiting the program, so it won't work.

I would appreciate it if anyone could give me advice on this issue.


Viewing all articles
Browse latest Browse all 22024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>