Skip to content

Commit 0b71745

Browse files
committed
type and test firming
1 parent 817efc1 commit 0b71745

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,10 +2462,10 @@ def fno_sanitize_type_outline_instrumentation : Flag<["-"], "fno-sanitize-type-o
24622462
HelpText<"Use default code inlining logic for the type sanitizer">;
24632463
def fsanitize_type_verify_outlined_instrumentation : Flag<["-"], "fsanitize-type-verify-outlined-instrumentation">,
24642464
Group<f_clang_Group>,
2465-
HelpText<"Use both inlined and outlined instrumentation for type sanitizer to verify equivilence">;
2465+
HelpText<"Use both inlined and outlined instrumentation for type sanitizer to verify equivalence">;
24662466
def fno_sanitize_type_verify_outlined_instrumentation : Flag<["-"], "fno_sanitize-type-verify-outlined-instrumentation">,
24672467
Group<f_clang_Group>,
2468-
HelpText<"Don't use both inlined and outlined instrumentation for type sanitizer to verify equivilence">;
2468+
HelpText<"Don't use both inlined and outlined instrumentation for type sanitizer to verify equivalence">;
24692469
defm sanitize_stable_abi
24702470
: OptInCC1FFlag<"sanitize-stable-abi", "Stable ", "Conventional ",
24712471
"ABI instrumentation for sanitizer runtime. Default: Conventional">;

clang/test/CodeGen/sanitize-type-outlined.cpp renamed to clang/test/CodeGen/sanitize-type-outlined.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@
99
// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
1010
// RUN: -fsanitize-type-outline-instrumentation \
1111
// RUN: -fsanitize-type-verify-outlined-instrumentation \
12-
// RUN: | FileCheck %s --check-prefixes=CHECK-OUTLINE-VERIFY
12+
// RUN: | FileCheck %s --check-prefixes=CHECK-OUTLINE
1313
// RUN: %clang -S -fsanitize=type -emit-llvm -o - -fsanitize=type %s \
1414
// RUN: -fsanitize-type-verify-outlined-instrumentation \
15-
// RUN: | FileCheck %s --check-prefixes=CHECK-VERIFY
15+
// RUN: | FileCheck %s --check-prefixes=CHECK-OUTLINE
1616

17+
// CHECK-LABEL: @alias
18+
// CHECK: __tysan_app_memory_mask
19+
// CHECK: __tysan_shadow_memory_address
1720
// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_mem_inst
21+
// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_with_shadow_update
1822
// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_mem_inst
19-
// CHECK-OUTLINE-VERIFY: call{{.*}}@__tysan_instrument_mem_inst
20-
// CHECK-VERIFY: call{{.*}}@__tysan_instrument_mem_inst
23+
// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_with_shadow_update
2124

2225
float alias(int *ptr){
2326
float *aliasedPtr = (float *)ptr;
27+
*aliasedPtr *= 2.0f;
2428
return *aliasedPtr;
2529
}

llvm/docs/ReleaseNotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ Changes to BOLT
202202
Changes to Sanitizers
203203
---------------------
204204

205+
* TypeSanitizer no longer inlines all instrumentation by default.
206+
205207
Other Changes
206208
-------------
207209

0 commit comments

Comments
 (0)