]> granicus.if.org Git - clang/commit
call __asan_load_cxx_array_cookie when loading array cookie in asan mode.
authorKostya Serebryany <kcc@google.com>
Fri, 29 Aug 2014 01:01:32 +0000 (01:01 +0000)
committerKostya Serebryany <kcc@google.com>
Fri, 29 Aug 2014 01:01:32 +0000 (01:01 +0000)
commita29d00b06890cc52c7c886e3e80e3f9625a283ae
tree8b523187be5c9095e6eaa76c278de2ddb9d815b7
parent4d4cf7df4788cefc929833e6dffd5381758dae2e
call __asan_load_cxx_array_cookie when loading array cookie in asan mode.

Summary:
The current implementation of asan cookie is incorrect:
we add nosanitize metadata to the cookie load, but the metadata may be lost
and we will instrument the load from poisoned memory.
This change replaces the load with a call to __asan_load_cxx_array_cookie (r216692)

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216702 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGen/address-sanitizer-and-array-cookie.cpp