comparison compiler-rt/test/hwasan/TestCases/stack-history-length.c @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 1d019706d866
children 5f17cb93ff66
comparison
equal deleted inserted replaced
220:42394fc6a535 221:79ff65ed7e25
1 // RUN: %clang_hwasan -O1 %s -o %t 1 // RUN: %clang_hwasan -O1 %s -o %t
2 // RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t 2045 2>&1 | FileCheck %s --check-prefix=YES 2 // RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t 2045 2>&1 | FileCheck %s --check-prefix=YES
3 // RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t 2047 2>&1 | FileCheck %s --check-prefix=NO 3 // RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t 2047 2>&1 | FileCheck %s --check-prefix=NO
4 4
5 // REQUIRES: stable-runtime 5 // REQUIRES: stable-runtime
6
7 // Stack aliasing is not implemented on x86.
8 // XFAIL: x86_64
6 9
7 #include <stdlib.h> 10 #include <stdlib.h>
8 11
9 void USE(void *x) { // pretend_to_do_something(void *x) 12 void USE(void *x) { // pretend_to_do_something(void *x)
10 __asm__ __volatile__("" : : "r" (x) : "memory"); 13 __asm__ __volatile__("" : : "r" (x) : "memory");