[ASAN] Add interceptor for __longjmp_chk 77/162177/1
authorPeter Wu <peter@lekensteyn.nl>
Wed, 29 Nov 2017 10:35:54 +0000 (13:35 +0300)
committerDenis Khalikov <d.khalikov@partner.samsung.com>
Wed, 29 Nov 2017 10:41:01 +0000 (13:41 +0300)
commit297e3d2955d3c6d7fd5a9af078343c879aec9bd9
treea6dd5e072cc0b21333deca80d784ed366ea173e6
parent1bff4e116ba869f7087a6851ce6eeb7f5bcffd36
[ASAN] Add interceptor for __longjmp_chk

Summary:
glibc on Linux calls __longjmp_chk instead of longjmp (or _longjmp) when
_FORTIFY_SOURCE is defined. Ensure that an ASAN-instrumented program
intercepts this function when a system library calls it, otherwise the
stack might remain poisoned and result in CHECK failures and false
positives.

Fixes https://github.com/google/sanitizers/issues/721

Reviewed By: eugenis

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302152 91177308-0d34-0410-b5e6-96231b3b80d8
Change-Id: I756e6a66139bc4ee95d3af1be792b025efe39ce0
libsanitizer/asan/asan_interceptors.cc
libsanitizer/asan/asan_interceptors.h