summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackProtector.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* tighten up this code.Chris Lattner2010-07-061-12/+7
| | | | llvm-svn: 107670
* Fix up -fstack-protector on linux to use the segmentEric Christopher2010-07-061-2/+15
| | | | | | | | | registers. Split out testcases per architecture and os now. Patch from Nelson Elhage. llvm-svn: 107640
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-1/+1
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92771
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Neuter stack protectors by only checking character arrays. This is what GCCBill Wendling2009-10-231-1/+6
| | | | | | does. llvm-svn: 84916
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-4/+7
| | | | llvm-svn: 78948
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-1/+1
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-1/+1
| | | | llvm-svn: 75703
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-1/+1
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-1/+1
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* When we split a basic block, there's a default branch to the newly created BB.Bill Wendling2009-03-061-0/+3
| | | | | | Delete this default branch, because we're going to generate our own. llvm-svn: 66234
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-1/+1
| | | | | | suggested by Chris. llvm-svn: 62099
* Rename stackprotector_create intrinsic to stackprotector.Bill Wendling2008-11-181-1/+1
| | | | llvm-svn: 59519
* Remove the stackprotector_check intrinsic. Use a volatile load instead.Bill Wendling2008-11-181-6/+4
| | | | llvm-svn: 59504
* - Use "moveAfter" instead of "remove/insert" of a basic block.Bill Wendling2008-11-181-103/+104
| | | | | | | | | - Use less indentation in coding. - Shorten description. - Update comments. - Move code around llvm-svn: 59496
* Implement stack protectors as function attributes: "ssp" and "sspreq".Bill Wendling2008-11-131-14/+12
| | | | llvm-svn: 59202
* Small simplification. Use the iterator already present as the insertion point.Bill Wendling2008-11-101-4/+3
| | | | llvm-svn: 59008
* - Make sure that we don't over-increment the iterator when going through theBill Wendling2008-11-101-7/+8
| | | | | | | basic blocks. - Minor code clean-up. llvm-svn: 59002
* - Modify the stack protector algorithm so that the stack slot is allocated inBill Wendling2008-11-071-31/+29
| | | | | | | | | LLVM IR code and not in the selection DAG ISel. This is a cleaner solution. - Fix the heuristic for determining if protectors are necessary. The previous one wasn't checking the proper type size. llvm-svn: 58824
* Remove unneeded header file.Bill Wendling2008-11-061-1/+0
| | | | llvm-svn: 58823
* Don't build a vector of returns. Just modify the Function in the loop.Bill Wendling2008-11-061-46/+49
| | | | llvm-svn: 58822
* The size limit is for individual arrays. So if any array has more than 8 bytesBill Wendling2008-11-061-5/+3
| | | | | | in it, then emit stack protectors. llvm-svn: 58819
* - Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.Bill Wendling2008-11-061-2/+2
| | | | | | | - Get rid of "HasStackProtector" in MachineFrameInfo. - Modify intrinsics to tell which are doing what with memory. llvm-svn: 58799
* Adjust the stack protector heuristic to care about only arrays or calls toBill Wendling2008-11-061-1/+9
| | | | | | "alloca". llvm-svn: 58792
* Implement the stack protector stack accesses via intrinsics:Bill Wendling2008-11-061-9/+11
| | | | | | | | | | | | - stackprotector_prologue creates a stack object and stores the guard there. - stackprotector_epilogue reads the stack guard from the stack position created by stackprotector_prologue. - The PrologEpilogInserter was changed to make sure that the stack guard is first on the stack frame. llvm-svn: 58791
* Remove dead variable.Bill Wendling2008-11-051-1/+0
| | | | llvm-svn: 58741
* Simplify the allocated size calculation.Bill Wendling2008-11-051-3/+3
| | | | llvm-svn: 58740
* Fix commentBill Wendling2008-11-051-1/+2
| | | | llvm-svn: 58739
* Some code simplification. It now doesn't generate a prologue if the epilogueBill Wendling2008-11-051-61/+47
| | | | | | isn't going to be generated. llvm-svn: 58734
* Small simplification of the stack guard type.Bill Wendling2008-11-041-4/+3
| | | | llvm-svn: 58728
* - Add a "getOrInsertGlobal" method to the Module class. This acts similarly toBill Wendling2008-11-041-14/+11
| | | | | | | | | | "getOrInsertFunction" in that it either adds a new declaration of the global and returns it, or returns the current one -- optionally casting it to the correct type. - Use the new getOrInsertGlobal in the stack protector code. - Use "splitBasicBlock" in the stack protector code. llvm-svn: 58727
* Update in response to feedback from Chris:Bill Wendling2008-11-041-28/+34
| | | | | | | | | | | | | | | | | - Use enums instead of magic numbers. - Rework algorithm to use the bytes size from the target to determine when to emit stack protectors. - Get rid of "propolice" in any comments. - Renamed an option to its expanded form. - Other miscellanenous changes. More changes will come after this. llvm-svn: 58723
* Initial checkin for stack protectors. Here's what it does:Bill Wendling2008-11-041-0/+228
* The prologue is modified to read the __stack_chk_guard global and insert it onto the stack. * The epilogue is modified to read the stored guard from the stack and compare it to the original __stack_chk_guard value. If they differ, then the __stack_chk_fail() function is called. * The stack protector needs to be first on the stack (after the parameters) to catch any stack-smashing activities. Front-end support will follow after a round of beta testing. llvm-svn: 58673
OpenPOWER on IntegriCloud