Skip to content

Commit

Permalink
Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-…
Browse files Browse the repository at this point in the history
…minimal-runtime.

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

llvm-svn: 346526
  • Loading branch information
pcc committed Nov 9, 2018
1 parent 69cf557 commit c976385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Driver/SanitizerArgs.cpp
Expand Up @@ -47,7 +47,7 @@ enum : SanitizerMask {
TrappingDefault = CFI,
CFIClasses =
CFIVCall | CFINVCall | CFIMFCall | CFIDerivedCast | CFIUnrelatedCast,
CompatibleWithMinimalRuntime = TrappingSupported | Scudo,
CompatibleWithMinimalRuntime = TrappingSupported | Scudo | ShadowCallStack,
};

enum CoverageFeature {
Expand Down
4 changes: 4 additions & 0 deletions clang/test/Driver/fsanitize.c
Expand Up @@ -767,6 +767,10 @@
// CHECK-CFI-NOICALL-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
// CHECK-CFI-NOICALL-MINIMAL: "-fsanitize-minimal-runtime"

// RUN: %clang -target x86_64-linux-gnu -fsanitize=shadow-call-stack -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCS-MINIMAL
// CHECK-SCS-MINIMAL: "-fsanitize=shadow-call-stack"
// CHECK-SCS-MINIMAL: "-fsanitize-minimal-runtime"

// RUN: %clang -target aarch64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
// RUN: %clang -target arm-linux-androideabi -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
Expand Down

0 comments on commit c976385

Please sign in to comment.