https://llvm.org/bugs/show_bug.cgi?id=24167
Bug ID: 24167
Summary: ASan is incompatible with SEH and llvm.localescape
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Transformation Utilities
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Classification: Unclassified
SEH uses llvm.localescape to share a local static alloca with other functions.
ASan thinks it can RAUW the alloca with a GEP+bitcast of a new, possibly
dynamic, alloca. That doesn't work for a few reasons:
1. ASan fails to preserve IR validity by moving llvm.localescape out of the
entry block. This is easy to fix.
2. The arguments to llvm.localescape must be casts of static allocas. We could
relax this to an offset into a static alloca and fold the offset into the asm
label we use.
3. The argument to llvm.localescape must be a static alloca. It cannot be a
dynamic alloca. This conflicts with ASan UAR as well. I think this can only be
fixed in ASan, because the runtime gives us one pointer to work with: the frame
or stack pointer. We have to be able to recover the address of the local
variable from that with offset arithmetic.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs