[PATCH] Add -fsanitize=leak to driver options.

Alexey Samsonov samsonov at google.com
Thu May 23 08:05:05 PDT 2013


  The approach looks good to me now. However, let's wait for Richard's comment as well.


================
Comment at: test/Driver/fsanitize.c:59
@@ -53,2 +58,3 @@
+
 // RUN: %clang -target x86_64-linux-gnu -faddress-sanitizer -fthread-sanitizer -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-TSAN
 // CHECK-ASAN-TSAN: '-faddress-sanitizer' not allowed with '-fthread-sanitizer'
----------------
Few more cases I can come up with:
1) All three of "-fsanitize=leak", "-fsanitize=address,leak", "-fsanitize=address,leak -fno-sanitize=address" work fine and
resolve to correct "-fsanitize=" flag passed to frontend.
2) Standalone LSan runtime is linked in when you pass "-fsanitize=leak" and not linked in when you pass "-fsanitize=leak,address".
This should go to test/Driver/sanitizer-ld.c


http://llvm-reviews.chandlerc.com/D837



More information about the cfe-commits mailing list