OSDN Git Service

[exceptions] Upgrade exception handlers when stack protector is used
authorEtienne Bergeron <etienneb@google.com>
Thu, 30 Jun 2016 15:36:59 +0000 (15:36 +0000)
committerEtienne Bergeron <etienneb@google.com>
Thu, 30 Jun 2016 15:36:59 +0000 (15:36 +0000)
commit6e9bd6a34dcb3f44c5fba1b11168ffb63786f06e
tree009440d28aa47937b3bd5957b779df5390ecc602
parent858a9e5ce3cb2d99517bce516b908b40735add46
[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
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/wineh-promote-eh.ll [new file with mode: 0644]