diff options
author | Reid Kleckner <rnk@google.com> | 2015-10-07 17:49:32 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-10-07 17:49:32 +0000 |
commit | 33bd2d99d81a08c1fffea4ffb51d692950f0ceae (patch) | |
tree | cb67054cb54deea223bf872705d8b5caae091efe /llvm/lib/CodeGen/AsmPrinter/WinException.cpp | |
parent | fc0ad42516dec82cff7d8189c6b0c79f4b93930c (diff) | |
download | bcm5719-llvm-33bd2d99d81a08c1fffea4ffb51d692950f0ceae.tar.gz bcm5719-llvm-33bd2d99d81a08c1fffea4ffb51d692950f0ceae.zip |
[WinEH] Fix two minor issues in __CxxFrameHandler3 tables
There was an off-by-one bug in ip2state tables which manifested when one
call immediately preceded the try-range of the next. The return address
of the previous call would appear to be within the try range of the next
scope, resulting in extra destructors or catches running.
We also computed the wrong offset for catch parameter stack objects. The
offset should be from RSP, not from RBP.
llvm-svn: 249578
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index 4f1d5cb864a..bc2c9ee635c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -791,7 +791,7 @@ void WinException::computeIP2StateTable( // Emit an entry indicating that PCs after 'Label' have this EH state. if (I.State != LastEHState) IPToStateTable.push_back( - std::make_pair(create32bitRef(I.BeginLabel), I.State)); + std::make_pair(getLabelPlusOne(I.BeginLabel), I.State)); LastEHState = I.State; LastEndLabel = I.EndLabel; } |