[PATCH] asan_test.C: disable -Wstringop-overflow, PR/93058

Sergei Trofimovich via gcc-patches gcc-patches@gcc.gnu.org
Fri Jan 24 23:20:00 GMT 2020


On Fri, 24 Jan 2020 22:20:43 +0100
Jakub Jelinek <jakub@redhat.com> wrote:

> On Fri, Jan 24, 2020 at 07:57:22AM +0000, slyfox.inbox.ru via gcc-patches wrote:
> > From: Sergei Trofimovich <slyfox@inbox.ru>
> > 
> > From: Sergei Trofimovich <siarheit@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.

Aha, I assume it was fixed by https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=768c83b7f60d82db6677e19dc51be9f341e0f3fc

I'll close gcc PR as invalid then.

Thank you!

-- 

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 981 bytes
Desc: Цифровая подпись OpenPGP
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200124/a8e889cf/attachment.sig>


More information about the Gcc-patches mailing list