[PATCH] D18846: [safestack] Add canary to unsafe stack frames

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 15:08:32 PDT 2016


pcc added a reviewer: timshen.
pcc added a comment.

Tim might also want to look at this since he's been working on the stack protector.


================
Comment at: lib/CodeGen/SafeStack.cpp:727
@@ +726,3 @@
+      F.hasFnAttribute(Attribute::StackProtectReq))
+    WithStackGuard = true;
+
----------------
Please make this a local variable, or just do the attribute test in the one place you need it.

================
Comment at: lib/CodeGen/SafeStack.cpp:788
@@ -725,1 +787,3 @@
+                                     Returns, BasePointer, StackGuardSlot);
+  StackGuardSlot = nullptr;
 
----------------
This line doesn't seem necessary.

================
Comment at: test/CodeGen/X86/safestack_ssp.ll:1
@@ +1,2 @@
+; RUN: llc -mtriple=i386-linux < %s -o - | FileCheck --check-prefix=LINUX-I386 %s
+; RUN: llc -mtriple=x86_64-linux < %s -o - | FileCheck --check-prefix=LINUX-X64 %s
----------------
Why is this a backend test rather than an opt test?


Repository:
  rL LLVM

http://reviews.llvm.org/D18846





More information about the llvm-commits mailing list