thread-sanitizer Questions
1
According to the thread-sanitizer docs:
ThreadSanitizer uses more real memory than a native run. At the default settings the memory overhead is 5x plus 1Mb per each thread. Settings with 3x (les...
Holey asked 8/1, 2019 at 9:44
1
Solved
The Problem
Recently on Linux Kernels 6.6.6 and higher it was discovered that thread sanitizer will always lead to this error:
FATAL: ThreadSanitizer: unexpected memory mapping 0x5c9bd4d2b000-0x5c9...
Carrasco asked 20/1 at 11:6
2
Solved
Both clang++ and g++ sanitizers produce similar warning about data race for this simple code. Is it a false alarm? What is the problem?
Code:
#include <thread>
struct A
{
void operator()()
...
Kujawa asked 27/7, 2022 at 10:45
0
I'm running the MPMC example given in boost lockfree queue documentation with thread sanitizer and to my surprise this basic example contains data races as per TSan. Any idea what might be wrong?
O...
Conservative asked 5/5, 2022 at 16:44
1
Solved
I'm learning about different memory orders.
I have this code, which works and passes GCC's and Clang's thread sanitizers:
#include <atomic>
#include <iostream>
#include <future>
...
Aloysius asked 31/12, 2021 at 13:59
1
I'm using a lock free stack (via tagged pointers) to manage a pool of small blocks of memory. The list nodes are created and destroyed in-place when the blocks are inserted into, and removed from, ...
Disappearance asked 20/5, 2020 at 17:53
1
Solved
When I create a new Single View App from in Xcode Version 11.3 (11C29) and run it all is ok.
When I turn on Thread Sanitize
And try to run the very same app, I get Thread 1: signal SIGABRT
...
Jalapa asked 30/12, 2019 at 0:42
1
The below code produce a warning when running with thread sanitizer on macOS. I can't see where the race is. The control block of shared_ptr and weak_ptr is thread safe, and pushing and popping fro...
Sharecropper asked 18/11, 2019 at 11:42
1
Solved
How can I detect whether thread sanitizer has been turned on for a build using gcc 5? Neither one of the two between __has_feature(thread_sanitizer) nor __SANITIZE_THREAD__ work
#include <iost...
Insociable asked 14/8, 2019 at 18:8
2
In Xcode 10.2 I can no longer run my app on a simulator with thread sanitizer enabled. I get the error
This app could not be installed at this time.
WatchKit v3 app has disallowed Info.plist ...
Izawa asked 23/4, 2019 at 19:42
2
Solved
Consider the following example:
#include <iostream>
int main () {
int i = 0;
#pragma omp parallel
{
#pragma omp critical
{
++i;
}
}
std::cout << i;
}
Compiling with g++ -f...
Kobarid asked 8/10, 2015 at 0:47
1
Solved
Consider the following code:
#include <atomic>
#include <iostream>
#include <thread>
std::atomic<int> x, y;
std::atomic<int> r1, r2;
void f()
{
r1 = y.load();
x =...
Shaunna asked 23/3, 2018 at 12:53
1
Solved
When using sanitizers with gcc one can provide a list of exceptions/suppressions to deal with false positives and such.
the suppression file format is poorly documented.
Each suppression is of th...
Retrograde asked 15/1, 2018 at 16:49
3
Solved
I am experimenting with g++ and thread sanitizer and I think I am getting false positives. Is this true, or am I making some big mistake?
Program (cut&paste from Anthony Williams: C++ Concurre...
Basile asked 15/8, 2016 at 9:43
2
Solved
I've boiled this down to a simple self-contained example. The main thread enqueues 1000 items, and a worker thread tries to dequeue concurrently. ThreadSanitizer complains that there's a race betwe...
Grumous asked 31/5, 2016 at 18:14
1
Solved
Has anyone tried clang's ThreadSanitizer with Intel Threading Building Blocks (TBB)?
My experience so far was that you will get a lot of warnings, even for relatively simple examples. Unfortunatel...
Squeeze asked 2/10, 2013 at 0:38
1
Xcode 8 incorporates the Thread Sanitizer, a tool for detecting race conditions and other threading-related issues.
I'm trying to run this against a project of mine, and am detecting many issues ...
Louanne asked 7/7, 2016 at 17:7
1
Solved
gcc v4.8.x add options for debugging your program:
-fsanitize=thread
Enable ThreadSanitizer, a fast data race detector. Memory access instructions will be instrumented to detect data race bugs. Se...
Howl asked 8/7, 2013 at 0:45
1
© 2022 - 2024 — McMap. All rights reserved.