rjmccall added inline comments.

================
Comment at: docs/ClangCommandLineReference.rst:805
 
-Enable poisoning array cookies when using class member operator new\[\] in 
AddressSanitizer
+Enable poisoning array cookies when using custom operator new\[\] in 
AddressSanitizer
 
----------------
rjmccall wrote:
> This is user documentation, so it would be good to explain here what exactly 
> this does and why you might enable or disable it.  I know the surrounding 
> documentation is even more barebones, but that's a problem, and it's a 
> problem we won't fix by making it worse.
Thanks.  Grammar/style clean-up:

> Enable "poisoning" array cookies when allocating arrays with a custom 
> `operator new[]` in Address Sanitizer, preventing accesses to the cookies 
> from user code.  An array cookie is a small implementation-defined header 
> added to certain array allocations to record metadata such as the length of 
> the array.  Accesses to array cookies from user code are technically allowed 
> by the standard but are more likely to be the result of an out-of-bounds 
> array access.

> An `operator new[]` is "custom" if it is not one of the allocation functions 
> provided by the C++ standard library.  Array cookies from non-custom 
> allocation functions are always poisoned.


Repository:
  rC Clang

https://reviews.llvm.org/D52615



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to