On Fri, Jan 24, 2020 at 07:57:22AM +0000, slyfox.inbox.ru via gcc-patches wrote:
> From: Sergei Trofimovich <sly...@inbox.ru>
> 
> From: Sergei Trofimovich <siarh...@google.com>
> 
> asan's test allocates 2 pages via pvalloc(kPageSize + 100)
> and makes sure dereference of 'kPageSize + 101' does not
> trigger asan checks.
> 
> glibc's and gcc's malloc-like attribute checkers trigger
> a warning:
>     asan_test.cc:129:22: error: writing 1 byte into a region
>     of size 0 [-Werror=stringop-overflow=]
> 
> As there is no easy way to convey pvalloc()'s granularity
> to gcc let's just disable the warning for this test.
> 
>       * g++.dg/asan/asan_test.C: disable -Wstringop-overflow.

No.  That is a glibc bug and it has been fixed in glibc already, if we
disabled this, we might never discovered it.

        Jakub

Reply via email to