Conversation
|
|
||
| fptr = (int (*)())dlsym(RTLD_DEFAULT, "RunningOnValgrind"); | ||
| if (fptr==NULL || fptr != RunningOnValgrind) | ||
| if (fptr == NULL) |
There was a problem hiding this comment.
@jprotze fptr pointer is NULL when -fsanitize=thread is not used, not NULL otherwise. So the only way to activate Archer is to keep only this check. Let me know what you think.
There was a problem hiding this comment.
The reasoning behind the extra check fptr != RunningOnValgrind is, that the dynamic loader might find the function RunningOnValgrind in ompt-tsan. In that case, we can also assume that there is no tsan in the application.
|
@jprotze With or without Archer is not working on OSX. I can't figure out if it's a Archer or a Tsan problem. |
|
Are the races detected, if you don't link the Archer runtime library? |
|
@jprotze I need to double check, but if I remember correctly when I don't link with Archer the races are detected but we get false positives on the tests with no races. If we link with Archer we get no false positives but not races are detected. |
@jprotze I fixed the driver for OSX since it was using the wrong library extension. Also I fix the runninOnValgrind function, however now it does not report any false alarm but it does not catch any racy. I verified that the "AnnotateHappens..." get called correctly but I can't figure out why on OSX it does not find any race.