[PATCH] D18846: [safestack] Add canary to unsafe stack frames
Tim Shen via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 15:02:46 PDT 2016
timshen added a comment.
In http://reviews.llvm.org/D18846#395911, @eugenis wrote:
> moveStaticAllocasToUnsafeStack must be called once per function.
As discussed, you may want to call moveStaticAllocasToUnsafeStack, then possibly in SDAG Intrinsic::stackprotector handling you need to handle non-Alloca cases explicitly.
Or if you think there are reasons to keep the code a little bit duplicated between SSP and SafeStack, I'm fine with it, since I'm not the owner of either. :)
> Also, there may be no unsafe stack frame at all, then there would be no need for the guard at all. SafeStack is currently smarter about this than StackProtector; it uses SCEV to prove that allocas can never overflow.
What if the source code does overflow? Does SafeStack just fails to build (seems unlikely?), or SSP still needs to be inserted?
Repository:
rL LLVM
http://reviews.llvm.org/D18846
More information about the llvm-commits
mailing list