I'm trying to use address sanitizer with clang to compile a C++ application but getting the following error:
/Class.so: undefined symbol: __asan_memset
I have added -fsanitize=address to the compiler flags
/opt/llvm-3.8.0/bin/clang++ -M --gcc-toolchain=/opt/gcc-5.2.0 -fsanitize=address
and I have added -fsanitize=address and -lasan to the linker flags:
-fsanitize=address -lasan -shared -fuse-ld=gold-2.25 -o Class.so Class.o
What else do I need to do to get this to work?