[cfe-commits] r172605 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/fsanitize.c
Alexey Samsonov
samsonov at google.com
Wed Jan 16 03:34:36 PST 2013
Author: samsonov
Date: Wed Jan 16 05:34:36 2013
New Revision: 172605
URL: http://llvm.org/viewvc/llvm-project?rev=172605&view=rev
Log:
Fix uninitialized bool flag access in SanitizerArgs parser
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/fsanitize.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=172605&r1=172604&r2=172605&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Jan 16 05:34:36 2013
@@ -1442,8 +1442,8 @@
RelaxDefault);
}
-SanitizerArgs::SanitizerArgs(const Driver &D, const ArgList &Args) {
- Kind = 0;
+SanitizerArgs::SanitizerArgs(const Driver &D, const ArgList &Args)
+ : Kind(0), BlacklistFile(""), MsanTrackOrigins(false) {
for (ArgList::const_iterator I = Args.begin(), E = Args.end(); I != E; ++I) {
unsigned Add, Remove;
Modified: cfe/trunk/test/Driver/fsanitize.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fsanitize.c?rev=172605&r1=172604&r2=172605&view=diff
==============================================================================
--- cfe/trunk/test/Driver/fsanitize.c (original)
+++ cfe/trunk/test/Driver/fsanitize.c Wed Jan 16 05:34:36 2013
@@ -36,6 +36,9 @@
// RUN: %clang -target x86_64-linux-gnu -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-TRACK-ORIGINS
// CHECK-ONLY-TRACK-ORIGINS: warning: argument unused during compilation: '-fsanitize-memory-track-origins'
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-EXTRA-TRACK-ORIGINS
+// CHECK-NO-EXTRA-TRACK-ORIGINS-NOT: "-fsanitize-memory-track-origins"
+
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize=alignment -fsanitize=vptr -fno-sanitize=vptr %s -### 2>&1
// OK
More information about the cfe-commits
mailing list