Skip to content
Commit 6b6d9bbd authored by Kuba Mracek's avatar Kuba Mracek
Browse files

[sanitizer] Avoid calling a nullptr in MonotonicNanoTime if interceptors are not yet initialized

There's a TSan startup crash on Linux when used in Swift programs, where MonotonicNanoTime will try to call real_clock_gettime and then jump to NULL because interceptors are not yet initialized. This is on Ubuntu 18.04. Looks like TSan's main Initialize() function is called at a point where __progname is already set, but interceptors aren't yet set up. Let's fix this by checking whether interceptors are initialized in MonotonicNanoTime.

Differential Revision: https://reviews.llvm.org/D53528

llvm-svn: 345174
parent 5efe8ec4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment