Currently running llvm, clang, clang-format, and clang-modernize on Ubuntu Bash on Windows. I would like to use the set of sanitize tools released by google including address, memory, and thread sanitize. None of the fsanitize options seem to work.
Here is the code sample 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 on 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'd love suggestions on how to get it working or if I'm missing part of the tool-chain or something.
Failing that I suppose I will dual-boot Ubuntu or Debian, because clang for windows is missing simple features like std:out support, though ideally I'd like to be able to compile both for Windows targets and Linux targets. I'd like to avoid dual-booting though as Ubuntu can't mount windows storage spaces, but they appear to be served to Ubuntu bash on windows quite well.