aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index b6175396d3..83be31eada 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -434,6 +434,7 @@ void AddressSanitizer::instrumentAddress(Instruction *OrigIns,
IRBuilder<> IRB1(CheckTerm);
Instruction *Crash = generateCrashCode(IRB1, AddrLong, IsWrite, TypeSize);
Crash->setDebugLoc(OrigIns->getDebugLoc());
+ ReplaceInstWithInst(CheckTerm, new UnreachableInst(*C));
}
// This function replaces all global variables with new variables that have
@@ -951,8 +952,8 @@ BlackList::BlackList(const std::string &Path) {
OwningPtr<MemoryBuffer> File;
if (error_code EC = MemoryBuffer::getFile(ClBlackListFile.c_str(), File)) {
- errs() << EC.message();
- exit(1);
+ report_fatal_error("Can't open blacklist file " + ClBlackListFile + ": " +
+ EC.message());
}
MemoryBuffer *Buff = File.take();
const char *Data = Buff->getBufferStart();