[cfe-dev] Thread Sanitizer reporting "failed to intercept clock_gettime"
samsonov at google.com
Wed Apr 24 13:03:33 PDT 2013
A couple of random guesses:
1) do you link with "-lrt"? clock_gettime is the function in librt, and you
should link against it explicitly.
2) if yes, do you use -Wl,--as-needed? We think it may be
sanitizer-hostile, see http://llvm.org/bugs/show_bug.cgi?id=15823
Normally if you call "clock_gettime" this symbol is undefined in your
library and is taken from librt.so
But if you build your code with -fsanitize=thread, "clock_gettime" is
resolved to a replacement provided by sanitizer
runtime, while the "real" clock_gettime is obtained by the call to
On Wed, Apr 24, 2013 at 9:45 PM, Sean McBride <sean at rogue-research.com>wrote:
> Hi all,
> We have been trying out Thread Sanitizer lately (on ubuntu 12.10, with
> clang trunk) and just ran into a problem where it outputs:
> FATAL: ThreadSanitizer: failed to intercept clock_gettime
> We do indeed use the clock_gettime() API (via a 3rd party library, but
> What does this error message mean? Is this a tsan bug? Or something
> that's our fault?
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev