Closed GoogleCodeExporter closed 9 years ago
Original comment by mojowi...@gmail.com
on 7 Jun 2014 at 2:47
Attachments:
mkdir build
cd build
cmake ..
make
./test
-> segfault
Original comment by mojowi...@gmail.com
on 7 Jun 2014 at 2:48
Additionally, I cannot use valgrind without it complaining:
Warning: set address range perms: large range
Original comment by mojowi...@gmail.com
on 7 Jun 2014 at 2:52
And valgrind seems to fall over with:
FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at
0x108000 < 0x7cf000000000)
FATAL: Make sure to compile with -fPIE and to link with -pie.
But I'm pretty sure this is being compiled with pie....
Original comment by mojowi...@gmail.com
on 7 Jun 2014 at 2:53
Naturally if I don't compile with tsan, pie, etc, then the code runs quite
happily and doesn't seem to have issues. So if such simple code is broken by
thread-sanitizer, how am I supposed to use it?
Original comment by mojowi...@gmail.com
on 7 Jun 2014 at 2:55
Actually, repeated locking and unlocking a mutex (without any additional
threads) makes the program crash under tsan. I observed this bug also on
clang-3.3. However, it was fixed on clang-3.4. Probably, it will be eventually
fixed under gcc as well.
Original comment by yegor.de...@gmail.com
on 7 Jun 2014 at 8:17
What version are you using?
Works fine for me on:
clang version 3.5.0 (209757)
Target: x86_64-unknown-linux-gnu
Original comment by dvyu...@google.com
on 9 Jun 2014 at 9:22
I tried on ubuntu 12.04 and ubuntu 14.04 -- tsan works.
Maybe there is some issue on your Linux distribution.
What Linux distro are you using?
As for valgrind: tsan and valgrind can not work together.
Original comment by konstant...@gmail.com
on 9 Jun 2014 at 9:56
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
I will try it out with clang when I get the chance. Thanks for the help.
Original comment by mojowi...@gmail.com
on 9 Jun 2014 at 12:59
Please reopen if you still see this issue with a more recent version of tsan.
Original comment by dvyu...@google.com
on 2 Sep 2014 at 2:11
Original issue reported on code.google.com by
mojowi...@gmail.com
on 7 Jun 2014 at 2:46Attachments: