lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Invalid pointer-pair?


From: Greg Chicares
Subject: Re: [lmi] Invalid pointer-pair?
Date: Fri, 10 Jun 2022 19:47:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 6/10/22 16:31, Vadim Zeitlin wrote:
> On Fri, 10 Jun 2022 15:48:17 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:
[...]
> GC> ASan with
> GC>   
> -fsanitize=address,undefined,leak,pointer-compare,pointer-subtract,float-divide-by-zero,float-cast-overflow,bounds-strict
> GC> and
> GC>   export 
> ASAN_OPTIONS=detect_leaks=0:detect_invalid_pointer_pairs=2:detect_invalid_pointer_pairs=2:strict_string_checks=1:\
[...]
> GC> ==820578==ERROR: AddressSanitizer: invalid-pointer-pair: 0x7f4c8d37ad00 
> 0x7f4c8d37a080
[...]
> GC> Wait...let's make it a std::array instead. Now it passes
> GC> all those ASan checks. That's actually a desirable change
> GC> in its own right, so it's not just a silly workaround.
> 
>  Yes, it's a good change, but if this ASAN optional breaks down so easily,
> it might explain why it's off by default... I thought this might be related
> to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97659

Fascinating. BTW, my experience differs on this particular point:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97659#c4
| 3. The issue shows up only when "pointer-subtract" is combined with
| _GLIBCXX_SANITIZE_VECTOR.

because I'm not defining that glibc macro, at least not knowingly.

> but I'm not really
> sure and didn't have time to look into it closer yet. But, again, this bug
> seems to indicate that this option isn't really usable with gcc currently

I've enabled too many '-fsanitize=', 'export ASAN_OPTIONS=", and
'-Wwhatever' flags all at once, and now I'm trying to find a maximal
subset that doesn't cause problems, while simultaneously changing
parts of the source code. I hope to have something useful to say later.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]