[PATCH] [clang/asan] call __asan_poison_cxx_array_cookie after operator new[]

Kostya Serebryany kcc at google.com
Mon Aug 4 05:58:59 PDT 2014


Hi samsonov, rsmith,

PR19838
When operator new[] is called and an array cookie is created
we want asan to detect buffer overflow bugs that touch the cookie.
For that we need to
  a) poison the shadow for the array cookie (call __asan_poison_cxx_array_cookie).
  b) ignore the legal accesses to the cookie generated by clang (add 'nosanitize' metadata)

http://reviews.llvm.org/D4774

Files:
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/ItaniumCXXABI.cpp
  lib/CodeGen/SanitizerMetadata.cpp
  lib/CodeGen/SanitizerMetadata.h
  test/CodeGen/address-sanitizer-and-array-cookie.cpp
  test/Frontend/optimization-remark.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4774.12155.patch
Type: text/x-patch
Size: 5961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140804/37cb604b/attachment.bin>


More information about the cfe-commits mailing list