[asan] Fix dynamic allocas unpoisoning on PowerPC64.
authorYury Gribov <y.gribov@samsung.com>
Fri, 4 Dec 2015 09:19:14 +0000 (09:19 +0000)
committerYury Gribov <y.gribov@samsung.com>
Fri, 4 Dec 2015 09:19:14 +0000 (09:19 +0000)
commit008021cd33a7820d7edee10536d7c4693f29129e
tree76822db103ccca77b6e7b4c60f7d0bb280981b2a
parent9ce890e1fe27d88dea0f652d11a09673eab67162
[asan] Fix dynamic allocas unpoisoning on PowerPC64.

For PowerPC64 we cannot just pass SP extracted from @llvm.stackrestore to
_asan_allocas_unpoison due to specific ABI requirements
(http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#DYNAM-STACK).
This patch adds the value returned by @llvm.get.dynamic.area.offset to
extracted from @llvm.stackrestore stack pointer, so dynamic allocas unpoisoning
stuff would work correctly on PowerPC64.

Patch by Max Ostapenko.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254707 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp