1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib/Transforms
Alexey Samsonov d5852a39f2 [ASan] Disable dynamic alloca and UAR detection in presence of returns_twice calls.
Summary:
returns_twice (most importantly, setjmp) functions are
optimization-hostile: if local variable is promoted to register, and is
changed between setjmp() and longjmp() calls, this update will be
undone. This is the reason why "man setjmp" advises to mark all these
locals as "volatile".

This can not be enough for ASan, though: when it replaces static alloca
with dynamic one, optionally called if UAR mode is enabled, it adds a
whole lot of SSA values, and computations of local variable addresses,
that can involve virtual registers, and cause unexpected behavior, when
these registers are restored from buffer saved in setjmp.

To fix this, just disable dynamic alloca and UAR tricks whenever we see
a returns_twice call in the function.

Reviewers: rnk

Subscribers: llvm-commits, kcc

Differential Revision: http://reviews.llvm.org/D11495

llvm-svn: 243561
2015-07-29 19:36:08 +00:00
..
Hello Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombine fix formatting; NFC 2015-07-28 15:38:43 +00:00
Instrumentation [ASan] Disable dynamic alloca and UAR detection in presence of returns_twice calls. 2015-07-29 19:36:08 +00:00
IPO LowerBitSets: Add debugging output. 2015-07-29 18:12:36 +00:00
ObjCARC [PM/AA] Extract the ModRef enums from the AliasAnalysis class in 2015-07-22 23:15:57 +00:00
Scalar [Unroll] Handle SwitchInst properly. 2015-07-29 18:10:33 +00:00
Utils [LDist][LVer] Explicitly pass the set of memchecks to LoopVersioning, NFC 2015-07-28 05:01:53 +00:00
Vectorize Fix -Wextra-semi warnings. 2015-07-22 20:46:11 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile