On Fri, Jan 10, 2014 at 10:23 AM, Uros Bizjak <ubiz...@gmail.com> wrote:
> On Mon, Dec 2, 2013 at 4:49 PM, Uros Bizjak <ubiz...@gmail.com> wrote:
>
>>>> Does it support using libbacktrace in GCC?
>>>
>>> Not on it's own, but the support in the upstream maintained files
>>> is there, so hopefully it will be just a matter of follow-up patch
>>> with configury/Makefile etc. stuff, I'll work on it once the merge is
>>> committed.
>>>
>>> What is more important now is to test the patch Kostya posted on non-x86_64
>>> targets and/or older kernel headers (say RHEL5, older SLES, etc.).
>>
>> Unfortunately, the build breaks on CentOS 5.10 (= RHEL5) with:
>>
>> libtool: compile:  /home/uros/gcc-build-xxx/./gcc/xgcc -shared-libgcc
>> -B/home/uros/gcc-build-xxx/./gcc -nostdinc++
>> -L/home/uros/gcc-build-xxx/x86_64-unknown-linux-gnu/libstdc++-v3/src
>> -L/home/uros/gcc-build-xxx/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
>> -L/home/uros/gcc-build-xxx/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
>> -B/usr/local/x86_64-unknown-linux-gnu/bin/
>> -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
>> /usr/local/x86_64-unknown-linux-gnu/include -isystem
>> /usr/local/x86_64-unknown-linux-gnu/sys-include -D_GNU_SOURCE -D_DEBUG
>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>> -I. -I../../../../gcc-svn/trunk/libsanitizer/sanitizer_common -I
>> ../../../../gcc-svn/trunk/libsanitizer/include -Wall -W
>> -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC
>> -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer
>> -funwind-tables -fvisibility=hidden -Wno-variadic-macros
>> -I../../libstdc++-v3/include
>> -I../../libstdc++-v3/include/x86_64-unknown-linux-gnu
>> -I../../../../gcc-svn/trunk/libsanitizer/../libstdc++-v3/libsupc++ -g
>> -O2 -D_GNU_SOURCE -MT sanitizer_platform_limits_linux.lo -MD -MP -MF
>> .deps/sanitizer_platform_limits_linux.Tpo -c
>> ../../../../gcc-svn/trunk/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc
>>  -fPIC -DPIC -o .libs/sanitizer_platform_limits_linux.o
>> ../../../../gcc-svn/trunk/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:54:30:
>> fatal error: linux/perf_event.h: No such file or directory
>>  #include <linux/perf_event.h>
>>                               ^
>> compilation terminated.
>> gmake[4]: *** [sanitizer_platform_limits_linux.lo] Error 1
>> gmake[4]: *** Waiting for unfinished jobs....
>
> I was able to compile sanitizer with r206475 (after Jakub's fixes) and
> run the testsuite. However, on 64bit target, I got some failures in
> asan and several timeouts in tsan [1].
>
> Looking at:
>
> FAIL: c-c++-common/tsan/atomic_stack.c  -O2  output pattern test, is ,
> should match WARNING: ThreadSanitizer: data race.*(
> WARNING: program timed out.
>
> the execution hangs in:
>
> Program received signal SIGINT, Interrupt.
> 0x00002aaaac0c5652 in malloc_consolidate () from /lib64/libc.so.6
> (gdb) bt
> #0  0x00002aaaac0c5652 in malloc_consolidate () from /lib64/libc.so.6
> #1  0x00002aaaac0c6461 in mallopt () from /lib64/libc.so.6
> #2  0x00002aaaaaf1a0e7 in __tsan::InitializeInterceptors () at
> ../../../../gcc-svn/trunk/libsanitizer/tsan/tsan_interceptors.cc:2099
> #3  0x00002aaaaaef8ab4 in __tsan::Initialize (thr=0x2aaaac3aa9e0
> <main_arena>) at
> ../../../../gcc-svn/trunk/libsanitizer/tsan/tsan_rtl.cc:223
> #4  0x00002aaaaaf016a8 in ScopedInterceptor::ScopedInterceptor
> (this=0x7fffffffda00, thr=0x2aaaacf0f580, fname=<optimized out>,
>     pc=46912524510627) at
> ../../../../gcc-svn/trunk/libsanitizer/tsan/tsan_interceptors.cc:173
> #5  0x00002aaaaaf16d77 in __interceptor_memset (dst=0x7fffffffda68,
> v=0, size=128)
>     at ../../../../gcc-svn/trunk/libsanitizer/tsan/tsan_interceptors.cc:621
> #6  0x00002aaaac5be5a3 in __pthread_initialize_minimal_internal ()
> from /lib64/libpthread.so.0
> #7  0x00002aaaac5bddd9 in _init () from /lib64/libpthread.so.0
> #8  0x0000000000000000 in ?? ()

The same tsan failures are reported in one of HJ's testers [2], with message:

FAIL: c-c++-common/tsan/atomic_stack.c  -O0  output pattern test, is
FATAL: ThreadSanitizer can not mmap the shadow memory (something is
mapped at 0x555555554000 < 0x7cf000000000)
FAIL: c-c++-common/tsan/atomic_stack.c  -O2  output pattern test, is
FATAL: ThreadSanitizer can not mmap the shadow memory (something is
mapped at 0x555555554000 < 0x7cf000000000)
...

[1] http://gcc.gnu.org/ml/gcc-testresults/2014-01/msg00689.html
[2] http://gcc.gnu.org/ml/gcc-testresults/2014-01/msg00705.html

Uros.

Reply via email to