Skip to content

Commit

Permalink
Use -fsanitize-recover instead of -mllvm -msan-keep-going: clang.
Browse files Browse the repository at this point in the history
Summary: Use -fsanitize-recover instead of -mllvm -msan-keep-going: pass -fsanitize-recover value to msan.

Reviewers: eugenis

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D26354

Patch by Aleksey Shlyapnikov.

llvm-svn: 286148
  • Loading branch information
eugenis committed Nov 7, 2016
1 parent e06ef14 commit 5b5370a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clang/lib/CodeGen/BackendUtil.cpp
Expand Up @@ -200,7 +200,9 @@ static void addMemorySanitizerPass(const PassManagerBuilder &Builder,
const PassManagerBuilderWrapper &BuilderWrapper =
static_cast<const PassManagerBuilderWrapper&>(Builder);
const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts();
PM.add(createMemorySanitizerPass(CGOpts.SanitizeMemoryTrackOrigins));
int TrackOrigins = CGOpts.SanitizeMemoryTrackOrigins;
bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Memory);
PM.add(createMemorySanitizerPass(TrackOrigins, Recover));

// MemorySanitizer inserts complex instrumentation that mostly follows
// the logic of the original code, but operates on "shadow" values.
Expand Down

0 comments on commit 5b5370a

Please sign in to comment.