llvm-project/clang/test/CodeGen/rtsan_entry_exit_insertion.c
Chris Apple f77e8f765e
[clang][rtsan] Reland realtime sanitizer codegen and driver (#102622)
This reverts commit a1e9b7e646b76bf844e8a9a101ebd27de11992ff
This relands commit d010ec6af8162a8ae4e42d2cac5282f83db0ce07

No modifications from the original patch. It was determined that the
ubsan build failure was happening even after the revert, some examples:

https://lab.llvm.org/buildbot/#/builders/159/builds/4477 
https://lab.llvm.org/buildbot/#/builders/159/builds/4478 
https://lab.llvm.org/buildbot/#/builders/159/builds/4479
2024-08-23 08:16:52 -07:00

14 lines
517 B
C

// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -fsanitize=realtime -emit-llvm -o - %s | FileCheck %s
int foo(int *a) [[clang::nonblocking]] { return *a; }
// The first instruction after the function is entred should be a call to
// enable the realtime sanitizer stack.
// CHECK-LABEL: define{{.*}}@foo
// CHECK-NEXT: entry:
// CHECK-NEXT: call{{.*}}__rtsan_realtime_enter
// __rtsan_realtime_exit should be inserted at all function returns.
// CHECK-LABEL: call{{.*}}__rtsan_realtime_exit
// CHECK-NEXT: ret