| 1 |
// RUN: %clang --target=x86_64-linux-gnu -S -fsanitize=type -emit-llvm -o - %s \ |
| 2 |
// RUN: -fno-sanitize-type-outline-instrumentation \ |
| 3 |
// RUN: | FileCheck %s --check-prefixes=CHECK-NO-OUTLINE |
| 4 |
// RUN: %clang --target=x86_64-linux-gnu -S -fsanitize=type -emit-llvm -o - %s \ |
| 5 |
// RUN: -fsanitize-type-outline-instrumentation \ |
| 6 |
// RUN: | FileCheck %s --check-prefixes=CHECK-OUTLINE |
| 7 |
|
| 8 |
// CHECK-LABEL: @alias |
| 9 |
// CHECK: __tysan_app_memory_mask |
| 10 |
// CHECK: __tysan_shadow_memory_address |
| 11 |
// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_mem_inst |
| 12 |
// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_with_shadow_update |
| 13 |
// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_mem_inst |
| 14 |
// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_with_shadow_update |
| 15 |
|
| 16 |
float alias(int *ptr){ |
| 17 |
float *aliasedPtr = (float *)ptr; |
| 18 |
*aliasedPtr *= 2.0f; |
| 19 |
return *aliasedPtr; |
| 20 |
} |