Commit Graph

4 Commits

Author SHA1 Message Date
Matthias Braun
294ff667fe SelectionDAGBuilder, mach-o: Skip trap after noreturn call (for Mach-O)
Add NoTrapAfterNoreturn target option which skips emission of traps
behind noreturn calls even if TrapUnreachable is enabled.

Enable the feature on Mach-O to save code size; Comments suggest it is
not possible to enable it for the other users of TrapUnreachable.

rdar://41530228

DifferentialRevision: https://reviews.llvm.org/D48674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335877 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-28 17:00:45 +00:00
Alexander Ivchenko
3c5de91faa [X86][CET] Shadow stack fix for setjmp/longjmp
This is the new version of D46181, allowing setjmp/longjmp
to work correctly with the Intel CET shadow stack by storing
SSP on setjmp and fixing it on longjmp. The patch has been
updated to use the cf-protection-return module flag instead
of HasSHSTK, and the bug that caused D46181 to be reverted
has been fixed with the test expanded to track that fix.

patch by mike.dvoretsky

Differential Revision: https://reviews.llvm.org/D47311



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333990 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-05 09:22:30 +00:00
Jessica Paquette
483fd529ec Revert "[X86][CET] Shadow stack fix for setjmp/longjmp"
This reverts commit 30962eca38.

This commit has been causing test asan failures on a build bot.

http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/45108/

Original commit: https://reviews.llvm.org/D46181

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331813 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-08 22:00:57 +00:00
Alexander Ivchenko
30962eca38 [X86][CET] Shadow stack fix for setjmp/longjmp
This patch adds a shadow stack fix when compiling
setjmp/longjmp with the shadow stack enabled. This
allows setjmp/longjmp to work correctly with CET.

Patch by mike.dvoretsky

Differential Revision: https://reviews.llvm.org/D46181


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331748 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-08 09:04:07 +00:00