diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-03-15 23:28:07 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-03-15 23:28:07 +0000 |
commit | 98ea4635ae8409d1d672d3db5e2c4c13dacef711 (patch) | |
tree | 90b1bd35409732fb7ad4afa6b59376d8bdf564ab | |
parent | 57174886c97962099029450618e9bdb9a0c5b95a (diff) |
This causes incorrect stack frame allocation when the last object is an array allocated on the stack which would lead
the compiled program to run over its stack. Thanks to Gil Dogon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67034 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Mips/MipsRegisterInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp index 8a468d1db5..a33e2c2c56 100644 --- a/lib/Target/Mips/MipsRegisterInfo.cpp +++ b/lib/Target/Mips/MipsRegisterInfo.cpp @@ -267,7 +267,7 @@ void MipsRegisterInfo::adjustMipsStackFrame(MachineFunction &MF) const if (LastOffsetFI >= 0) StackOffset = MFI->getObjectOffset(LastOffsetFI)+ - MFI->getObjectAlignment(LastOffsetFI); + MFI->getObjectSize(LastOffsetFI); StackOffset = ((StackOffset+StackAlign-1)/StackAlign*StackAlign); for (unsigned i = 0, e = CSI.size(); i != e ; ++i) { |