[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / longjmp-out-of-range.c
blob2d7ed2ab5ee2424a43a08b2a09ead1fdc3ac6f10
1 // RUN: %clang_hwasan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
3 // REQUIRES: pointer-tagging
4 #include <assert.h>
5 #include <sanitizer/hwasan_interface.h>
6 #include <stdlib.h>
8 __attribute__((noinline)) int f(void *caller_frame) {
9 int z = 0;
10 int *volatile p = &z;
11 // Tag of local is never zero.
12 assert(__hwasan_tag_pointer(p, 0) != p);
13 __hwasan_handle_longjmp(NULL);
14 return p[0];
17 int main() {
18 return f(__builtin_frame_address(0));
19 // CHECK: HWASan is ignoring requested __hwasan_handle_longjmp: