Probing of allocated stack space is now done when this option is passed. The purpose is to protect against the stack clash attack (see https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt). Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D78717
14 lines
511 B
C
14 lines
511 B
C
// RUN: %clang -target s390x-linux-gnu -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SystemZ
|
|
// SystemZ: "-fstack-clash-protection"
|
|
// RUN: %clang -target s390x-linux-gnu -fstack-clash-protection -S -emit-llvm -o %t.ll %s 2>&1 | FileCheck %s -check-prefix=SystemZ-warn
|
|
// SystemZ-warn: warning: Unable to protect inline asm that clobbers stack pointer against stack clash
|
|
|
|
int foo(int c) {
|
|
int r;
|
|
__asm__("ag %%r15, %0"
|
|
:
|
|
: "rm"(c)
|
|
: "r15");
|
|
return r;
|
|
}
|