Llvm, clang, clang-format and clang-modernize are currently running on Ubuntu Bash on Windows. I would like to use the google sanitation toolkit, including address, memory and thread. None of the fsanitize options work.
Here is a sample code for ASAN:
#include <stdlib.h> int main() { char *x = (char *)malloc(10 * sizeof(char *)); free(x); return x[5];// purposely accessing deallocated memory }
Here is the clang call in bash in windows:
$clang++-3.5 -fsanitize=address -o1 -fno-omit-frame-pointer -g main.cpp -o main $./main
results
==70==Sanitizer CHECK failed: build/buildd/llvm-toolchain-snapshot-3.5/projects/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc:211 ((IsOneOf(*current_, 's', 'p'))) != (0)(0,0)
I would like suggestions on how to make it work, or if I miss part of the tool chain or something like that.
Otherwise, I assume that I will boot Ubuntu or Debian with dual boot, because clang for Windows does not contain the simplest functions such as std: out support, although ideally I would like to compile for both Windows and Linux I would like to avoid double booting, though, since Ubuntu cannot mount Windows storage areas, but they seem to be well served by Ubuntu Bash in windows.
source share