[PATCH] D38971: Enhance libsanitizer support for invalid-pointer-pair.

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 17:19:34 PDT 2017


kcc added a comment.

In https://reviews.llvm.org/D38971#899679, @jakubjelinek wrote:

> Shouldn't detect_invalid_pointer_pairs=1 be the default?  I mean, the user already makes the decision to enable it through a compiler option/parameter and the generated code adds non-zero amount of .text space and some runtime cost, and there is no extra runtime costs for this if code isn't instrumented, so detect_invalid_pointer_pairs=0 by default only causes false assumption that code is error clean.


Maybe later. 
The reason for these two-stage flags is that first we need to ensure that the instrumentation itself does not introduce any trouble (excessive code size, too frequent callbacks, etc). 
Only then, we want to enable the run-time feature and we can do it selectively at process startup vi __asan_default_options or ASAN_OPTIONS


https://reviews.llvm.org/D38971





More information about the llvm-commits mailing list