diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-12-04 22:21:15 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-12-04 22:21:15 +0000 |
commit | 361d4392cf5425bf560f88895f22df61b273fe4e (patch) | |
tree | 1f6eedd1e5af96360da68cd45d7137a054e30286 /llvm/lib/CodeGen/StackProtector.cpp | |
parent | 68f05052638e11164bc88cd4022ad78d8ad72306 (diff) | |
download | bcm5719-llvm-361d4392cf5425bf560f88895f22df61b273fe4e.tar.gz bcm5719-llvm-361d4392cf5425bf560f88895f22df61b273fe4e.zip |
Revert r319490 "XOR the frame pointer with the stack cookie when protecting the stack"
This broke the Chromium build (crbug.com/791714). Reverting while investigating.
> Summary: This strengthens the guard and matches MSVC.
>
> Reviewers: hans, etienneb
>
> Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D40622
>
> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319490 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-svn: 319706
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackProtector.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index 62cef95a4af..e3340028863 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -385,12 +385,8 @@ static bool CreatePrologue(Function *F, Module *M, ReturnInst *RI, /// - The epilogue checks the value stored in the prologue against the original /// value. It calls __stack_chk_fail if they differ. bool StackProtector::InsertStackProtectors() { - // If the target wants to XOR the frame pointer into the guard value, it's - // impossible to emit the check in IR, so the target *must* support stack - // protection in SDAG. bool SupportsSelectionDAGSP = - TLI->useStackGuardXorFP() || - (EnableSelectionDAGSP && !TM->Options.EnableFastISel); + EnableSelectionDAGSP && !TM->Options.EnableFastISel; AllocaInst *AI = nullptr; // Place on stack that stores the stack guard. for (Function::iterator I = F->begin(), E = F->end(); I != E;) { |