-fsanitize=address on centos 6.4


I noticed that the SVN version of clang+llvm does not like -fsanitize=address on centos 6.4. By "like" I mean it asserts anytime a thread is created. With errors like:

==18015==AddressSanitizer CHECK failed: clang/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:251 "((*tls_addr + *tls_size)) <= ((*stk_addr + *stk_size))" (0xf2f7d030, 0xf2f7d000)

If I use the llvm+clang 3.3 version it works properly.

+llvm-dev, earthdok@google.com


Hi Sharma,
We don’t have centos, so we’d ask you for some assistance.
First, could you please run the test with env.var. ASAN_OPTIONS=verbosity=1

Sergey, this CHECK is yours, please take a look.


+llvmdev (llvm-dev does not exist)

GNU ld version 20100205

Copyright 2009 Free Software Foundation, Inc.

This program is free software; you may redistribute it under the terms of

the GNU General Public License version 3 or (at your option) a later version.

This program has absolutely no warranty.

This looks like the output of “ld --version”. What we need is your glibc version, which is given by “ldd --version”.

+kcc, llvmdev

I think your compiler-rt checkout is out of date, because r188635 is supposed to fix that exact issue.

I did a make update. I thought I was running the newest version of compiler-rt. But now I can’t even get the project to build. I get the following error:

i386-redhat-linux-gnu-clang++: clang/llvm/include/llvm/ADT/SmallVector.h:544: typename llvm::SmallVectorTemplateBase<T, llvm::isPodLike::value>::iterator llvm::SmallVectorImpl::insert(typename llvm::SmallVectorTemplateBase<T, llvm::isPodLike::value>::iterator, const T&) [with T = const char*]: Assertion `I <= this->end() && “Inserting past the end of the vector.”’ failed.

0 i386-redhat-linux-gnu-clang++ 0x0000000002431452 llvm::sys::PrintStackTrace(_IO_FILE*) + 34

1 i386-redhat-linux-gnu-clang++ 0x000000000243264a

2 libpthread.so.0 0x0000003b1d60f500

3 libc.so.6 0x0000003b1d2328a5 gsignal + 53

4 libc.so.6 0x0000003b1d234085 abort + 373

5 libc.so.6 0x0000003b1d22ba1e

6 libc.so.6 0x0000003b1d22bae0 __assert_perror_fail + 0

7 i386-redhat-linux-gnu-clang++ 0x00000000006adb64 main + 8420

8 libc.so.6 0x0000003b1d21ecdd __libc_start_main + 253

9 i386-redhat-linux-gnu-clang++ 0x00000000006a5759

I have no idea about this particular error. Perhaps someone else can chime in?