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

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 14:03:40 PDT 2016


eugenis added inline comments.

================
Comment at: lib/CodeGen/SafeStack.cpp:399
@@ +398,3 @@
+    StackGuardVar =
+        F.getParent()->getOrInsertGlobal("__stack_chk_guard", StackPtrTy);
+  return IRB.CreateLoad(StackGuardVar, "StackGuard");
----------------
timshen wrote:
> timshen wrote:
> > Is this going to work correctly, for say, PowerPC? As of my knowledge on powerpc64le-linux-gnu, there is no "__stack_chk_guard", but similarly has a data member in TCB.
> > 
> > On SSP side I'm actively working on supporting PowerPC - more generally, allowing backends to lower LOAD_STACK_GUARD node manually.
> To be specific, powerpc64le-linux-gnu is similar to AArch64, which has a stack guard as data member in TCB.
Then it should implement getStackCookieLocation - or is it only supported in the SelectionDAG code pass now?


Repository:
  rL LLVM

http://reviews.llvm.org/D18846





More information about the llvm-commits mailing list