I've implemented a locked hash table and I've created a unit test of the same to test concurrent read/writing to the table. After thread sanitisation with clang (AppleClang), it reports no errors but GCC (g++8) on the other hand spills lines of what…
I download normally the latest clang version from their website. This helps me use the latest version of C++ as doing this with gcc is not really possible. I just get the binaries for my Ubuntu/Debian and I'm good to go.
For me, linking with tsan…
For some reason I can't use Helgrind to detect misuses of the POSIX pthreads API (for example, unlocking a non-locked mutex, deallocation of memory that contains a locked mutex and so on). I tried to find another tool but actually failed. As I found…
Whenever I start the app up with the thread sanitizer on, it just freezes up. When I pause execution, I always see some sort of tsan function call that the main thread has become completely stuck on. How can I prevent this? I'm using Xcode 8.3.2.
The following code synchronizes via shared_ptr:
#include
#include
#include
#include
#include
#include
using std::shared_ptr;
using std::async;
using std::launch;
using…
ThreadSanitizer detects a data race in the following Swift program run on macOS:
import Dispatch
class Foo {
var value: T?
let queue = DispatchQueue(label: "Foo syncQueue")
init(){}
func complete(value: T) {
queue.sync…
I am getting following error message while running my thread-sanitized executable. (I have used -fPIC and -fsanitized=thread flag at compilation , -fsanitize=thread -Wland '-pie' flag during executable time):
FATAL: ThreadSanitizer can not mmap the…
My app used the wxWidgets library, built from source via gcc 5.1.0, using -g and -O0
I compiled my app using clang++36 -g -fsanitize=thread -stdlib=libc++, and linked it using clang++36 -g -fsanitize=thread -stdlib=libc++ -lc++abi. It dynamically…
We are using GCC and Intel OpenMP.
I know that the combination of GCC and GCC OpenMP needs a special build of OpenMP (to use pthread interfaces rather than directly use the futex system call).
Is it possible to use Thread Sanitizer and GCC + Intel…
I'm getting warnings about data races from Thread Sanitizer in this toy example:
#include
#include
#include
int main () {
std::vector vec(10);
// increase each vector entry 10 times. Each increment is one…
Background motivation: I have some code that uses a lock-free algorithm to share audio data to/from a CoreAudio callback (only because CoreAudio callbacks-threads are real-time and therefore aren't allowed to lock mutexes). This code seems to work…
I have a program where many threads do some computations and write a boolean true value in a shared array to tag the corresponding item as "dirty". This is a data race, reported by ThreadSanitizer. Nevertheless, the flag is never read from these…
We are getting false positive ThreadSanitizer (tsan) data race warnings on a frequent but inconsistent basis. Though it is well-known that tsan can give false positive warnings, some of which may be suppressed via the TSAN_OPTIONS environment…
I am running Unit tests with Thread Sanitizer enabled and I am getting a Data Race warning when executing the statement
try? await Task.sleep(nanoseconds: 10_000_000)
Update
I was able to reproduce the data race warning with only Swift Combine and…