[compiler-rt] r266106 - [safestack] Fix stack canary test on Mac.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 11:48:41 PDT 2016


Author: eugenis
Date: Tue Apr 12 13:48:41 2016
New Revision: 266106

URL: http://llvm.org/viewvc/llvm-project?rev=266106&view=rev
Log:
[safestack] Fix stack canary test on Mac.

Disable FORTIFY_SOURCE and explicitly disable stack protector in the
no-stack-protector run.

Modified:
    compiler-rt/trunk/test/safestack/canary.c

Modified: compiler-rt/trunk/test/safestack/canary.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/safestack/canary.c?rev=266106&r1=266105&r2=266106&view=diff
==============================================================================
--- compiler-rt/trunk/test/safestack/canary.c (original)
+++ compiler-rt/trunk/test/safestack/canary.c Tue Apr 12 13:48:41 2016
@@ -1,7 +1,7 @@
-// RUN: %clang_safestack -g %s -o %t.nossp
+// RUN: %clang_safestack -fno-stack-protector -D_FORTIFY_SOURCE=0 -g %s -o %t.nossp
 // RUN: %run %t.nossp 2>&1 | FileCheck --check-prefix=NOSSP %s
 
-// RUN: %clang_safestack -fstack-protector-all -g %s -o %t.ssp
+// RUN: %clang_safestack -fstack-protector-all -D_FORTIFY_SOURCE=0 -g %s -o %t.ssp
 // RUN: not --crash %run %t.ssp 2>&1 | FileCheck -check-prefix=SSP %s
 
 // Test stack canaries on the unsafe stack.




More information about the llvm-commits mailing list