diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2014-01-14 04:20:01 +0000 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2014-01-14 04:20:01 +0000 |
commit | 8271118a65ffb8216593967df504fae2c9252bd2 (patch) | |
tree | 74b575b8159fa24ddad2894070dd41962a5d30fd /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | af968eda27a3574e89aa7920ad84b2085293f4b5 (diff) | |
download | llvm-8271118a65ffb8216593967df504fae2c9252bd2.zip llvm-8271118a65ffb8216593967df504fae2c9252bd2.tar.gz llvm-8271118a65ffb8216593967df504fae2c9252bd2.tar.bz2 |
Fix llc to not reuse spill slots in functions that invoke setjmp()
We need to ensure that StackSlotColoring.cpp does not reuse stack
spill slots in functions that call "returns_twice" functions such as
setjmp(), otherwise this can lead to miscompiled code, because a stack
slot would be clobbered when it's still live.
This was already handled correctly for functions that call setjmp()
(though this wasn't covered by a test), but not for functions that
invoke setjmp().
We fix this by changing callsFunctionThatReturnsTwice() to check for
invoke instructions.
This fixes PR18244.
llvm-svn: 199180
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions