diff options
author | Etienne Bergeron <etienneb@google.com> | 2016-06-30 15:36:59 +0000 |
---|---|---|
committer | Etienne Bergeron <etienneb@google.com> | 2016-06-30 15:36:59 +0000 |
commit | 6e9bd6a34dcb3f44c5fba1b11168ffb63786f06e (patch) | |
tree | 009440d28aa47937b3bd5957b779df5390ecc602 /test/CodeGen/WinEH | |
parent | 858a9e5ce3cb2d99517bce516b908b40735add46 (diff) |
[exceptions] Upgrade exception handlers when stack protector is used
Summary:
MSVC provide exception handlers with enhanced information to deal with security buffer feature (/GS).
To be more secure, the security cookies (GS and SEH) are validated when unwinding the stack.
The following code:
```
void f() {}
void foo() {
__try {
f();
} __except(1) {
f();
}
}
```
Reviewers: majnemer, rnk
Subscribers: thakis, llvm-commits, chrisha
Differential Revision: http://reviews.llvm.org/D21101
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/WinEH')
-rw-r--r-- | test/CodeGen/WinEH/wineh-promote-eh.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/WinEH/wineh-promote-eh.ll b/test/CodeGen/WinEH/wineh-promote-eh.ll new file mode 100644 index 00000000000..7bda4d7bd4d --- /dev/null +++ b/test/CodeGen/WinEH/wineh-promote-eh.ll @@ -0,0 +1,16 @@ +; RUN: opt -mtriple=i686-windows-msvc -S -winehprepare %s | FileCheck %s + +declare i32 @_except_handler3(...) + +define void @test1a() personality i32 (...)* @_except_handler3 { +; CHECK: define void @test1a() personality i32 (...)* @_except_handler3 +entry: + ret void +} + +define void @test1b() ssp personality i32 (...)* @_except_handler3 { +; CHECK: define void @test1b() [[attr:.*]] personality i32 (...)* @_except_handler4 +entry: + ret void +} + |