This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] [asan] Fix for PR asan/56330
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: Dodji Seketeli <dodji at redhat dot com>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Dmitry Vyukov <dvyukov at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 16 Feb 2013 09:37:30 +0100
- Subject: Re: [PATCH] [asan] Fix for PR asan/56330
- References: <firstname.lastname@example.org> <20130215230105.GA2210@bromo.med.uc.edu>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Feb 15, 2013 at 06:01:05PM -0500, Jack Howarth wrote:
> On Fri, Feb 15, 2013 at 09:54:19PM +0100, Dodji Seketeli wrote:
> FAIL: c-c++-common/asan/no-redundant-instrumentation-7.c -O0 scan-tree-dump-times asan0 "__builtin___asan_report_load" 6
> at both -m32 and -m64. The no-redundant-instrumentation-7.s from the failing -m64
> test case is attached, generated with...
foo (int *a, char *b, char *c)
__builtin_memcmp (s.a, e, 100);
__builtin_memcmp (s.a, e, 200);
is problematic, for -O1 both calls would be definitely removed, because they
are pure, and even at -O0 I guess they might be expanded into nothing.
int i = __builtin_memcmp (s.a, e, 100);
i += __builtin_memcmp (s.a, e, 200);
or similar would work better. And for pr56330.c testcase, which is there to
verify that we don't ICE on it and I believe there was important that both
builtins are adjacent, perhaps it should be __builtin_memcpy instead.