Oops, ignore that. Forgot -C gcc

On Thu, May 22, 2014 at 4:49 PM, Konstantin Serebryany
<konstantin.s.serebry...@gmail.com> wrote:
> On Thu, May 22, 2014 at 3:03 PM, Jakub Jelinek <ja...@redhat.com> wrote:
>> On Thu, May 22, 2014 at 02:26:19PM +0400, Konstantin Serebryany wrote:
>>> >> >> FAIL: c-c++-common/asan/asan-interface-1.c  -O0  execution test
>>> >> >Is that before or after r210743?
>>
>> Can't reproduce the above (note, not bootstrapped compiler, just
>> --disable-bootstrap), check-gcc RUNTESTFLAGS=asan.exp is clean, but
>> check-g++ RUNTESTFLAGS=asan.exp I got:
>
> How exactly do you run this check-g++?
>
> For me:
> % make check-gcc RUNTESTFLAGS=asan.exp
> make[1]: Entering directory ...  <works>
>
> make check-g++ RUNTESTFLAGS=asan.exp
> make: *** No rule to make target `check-g++'.  Stop.
>
>
>
>
>
>
>> Running /usr/src/gcc/gcc/testsuite/g++.dg/asan/asan.exp ...
>> FAIL: g++.dg/asan/asan_test.C  -O2  AddressSanitizer_MallocUsableSizeTest 
>> execution test
>> :
>> Setting LD_LIBRARY_PATH to 
>> .:/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs:/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libst
>> dc++-v3/src/.libs:/usr/src/gcc/obj2/gcc:/usr/src/gcc/obj2/gcc/32:/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libsanitizer/asan/.libs:.:/usr/src/gc
>> c/obj2/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs:/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs:/usr/src/gcc/obj2/gcc:
>> /usr/src/gcc/obj2/gcc/32:/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libsanitizer/asan/.libs
>> spawn [open ...]
>> DEJAGNU_GTEST_EXPECT_DEATH1 malloc_usable_size((void*)0x123) 
>> DEJAGNU_GTEST_EXPECT_DEATH1 AddressSanitizer: attempting to call 
>> malloc_usable_size()
>> DEJAGNU_GTEST_EXPECT_DEATH1
>> DEJAGNU_GTEST_EXPECT_DEATH2 malloc_usable_size(array + kArraySize / 2) 
>> DEJAGNU_GTEST_EXPECT_DEATH2 AddressSanitizer: attempting to call malloc_usab
>> le_size() DEJAGNU_GTEST_EXPECT_DEATH2
>> DEJAGNU_GTEST_EXPECT_DEATH3 malloc_usable_size(array) 
>> DEJAGNU_GTEST_EXPECT_DEATH3 AddressSanitizer: attempting to call 
>> malloc_usable_size() DEJAGNU
>> _GTEST_EXPECT_DEATH3
>>
>> =================================================================
>> ==28396==ERROR: LeakSanitizer: detected memory leaks
>>
>> Direct leak of 4 byte(s) in 1 object(s) allocated from:
>>     #0 0x7f5c18048df9 in operator new(unsigned long) 
>> ../../../../libsanitizer/asan/asan_new_delete.cc:53
>>     #1 0x409134 in AddressSanitizer_MallocUsableSizeTest_fn 
>> /usr/src/gcc/gcc/testsuite/g++.dg/asan/asan_test.cc:407
>>
>> SUMMARY: AddressSanitizer: 4 byte(s) leaked in 1 allocation(s).
>> FAIL: g++.dg/asan/asan_test.C  -O2  AddressSanitizer_MallocUsableSizeTest 
>> execution test
>>
>> If I manually compile it:
>> /usr/src/gcc/obj2/gcc/testsuite/g++/../../xg++ 
>> -B/usr/src/gcc/obj2/gcc/testsuite/g++/../../ 
>> /usr/src/gcc/gcc/testsuite/g++.dg/asan/asan_test.C -fsanitize=address -g 
>> -I/usr/src/gcc/gcc/testsuite/../../libsanitizer/include 
>> -fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++ 
>> -I/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
>>  -I/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/libstdc++-v3/include 
>> -I/usr/src/gcc/libstdc++-v3/libsupc++ 
>> -I/usr/src/gcc/libstdc++-v3/include/backward 
>> -I/usr/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 
>> -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 
>> -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DASAN_USE_DEJAGNU_GTEST=1 
>> -lasan -lpthread -ldl -DASAN_NEEDS_SEGV=1 -DASAN_AVOID_EXPENSIVE_TESTS=1 
>> -msse2 -D__NO_INLINE__ 
>> /usr/src/gcc/gcc/testsuite/g++.dg/asan/asan_globals_test-wrapper.cc 
>> -B/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libsanitizer/ 
>> -B/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libsanitizer/asan/ 
>> -L/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libsanitizer/asan/.libs 
>> -L/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs 
>> -B/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs 
>> -L/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs -lm -o 
>> ./asan_test.exe 
>> -Wl,-rpath,/usr/src/gcc/obj2/x86_64-unknown-linux-gnu/./libsanitizer/asan/.libs/
>> and run:
>> ./asan_test.exe AddressSanitizer_MallocUsableSizeTest
>> I get the same error.
>>
>> Seems compiler-rt has there:
>>
>> --- gcc/testsuite/g++.dg/asan/asan_test.cc      2013-11-12 
>> 11:31:20.000000000 +0100
>> +++ gcc/testsuite/g++.dg/asan/asan_test.cc      2014-05-22 
>> 13:00:23.391901708 +0200
>> @@ -413,6 +413,7 @@ TEST(AddressSanitizer, MallocUsableSizeT
>>                 kMallocUsableSizeErrorMsg);
>>    free(array);
>>    EXPECT_DEATH(malloc_usable_size(array), kMallocUsableSizeErrorMsg);
>> +  delete int_ptr;
>>  }
>>  #endif
>>
>> There are various other changes to asan_test.cc, so guess some work is 
>> needed on that.
>>
>>         Jakub

Reply via email to