This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix asan regtest failures c-c++-common/asan/{memcmp-1.c,strncpy-overflow-1.c}
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Nov 2013 17:19:43 +0100
- Subject: Re: [PATCH] Fix asan regtest failures c-c++-common/asan/{memcmp-1.c,strncpy-overflow-1.c}
- Authentication-results: sourceware.org; auth=none
- References: <87fvr39gvi dot fsf at redhat dot com> <20131111140910 dot GY27813 at tucnak dot zalov dot cz>
Jakub Jelinek <jakub@redhat.com> writes:
> On Mon, Nov 11, 2013 at 03:01:53PM +0100, Dodji Seketeli wrote:
>> Since a couple of days I am seeing failure on the tests above on my
>> Fedora system. The errors look like:
>>
>> FAIL: c-c++-common/asan/memcmp-1.c -O0 output pattern test, is =================================================================
>> ==21832==ERROR: AddressSanitizer: stack-buffer-overflow on address
>> 0x7fff75df96f4 at pc 0x7f98ecbab68b bp 0x7fff75df96b0 sp
>> 0x7fff75df95b8
>> READ of size 6 at 0x7fff75df96f4 thread T0
>> #0 0x7f98ecbab68a in __interceptor_memcmp /home/dodji/git/gcc/master/libsanitizer/asan/asan_interceptors.cc:295 (discriminator 7)
>> #1 0x7f98ecbb6393 in __asan_report_error /home/dodji/git/gcc/master/libsanitizer/asan/asan_report.cc:774 (discriminator 9)
>> #2 0x7f98ecbab6d0 in __interceptor_memcmp /home/dodji/git/gcc/master/libsanitizer/asan/asan_interceptors.cc:295 (discriminator 7)
>> #3 0x400b0a in main /home/dodji/git/gcc/master/gcc/testsuite/c-c++-common/asan/memcmp-1.c:14
>
> That looks like a bug in libasan, __asan_report_error doesn't call memcmp
> again. So something is wrong with getting proper backtrace it seems.
Correct. I'll need to get familiar with the backtracing part then,
unless someone beats me to it.
--
Dodji