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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 23 08:42:01 PDT 2018


kubamracek added a comment.

In https://reviews.llvm.org/D53528#1272580, @cryptoad wrote:

> There is a check for real_clock_gettime (as an extern "C", not part of the interception namespace) in MonotonicNanoTime, as defined by sanitizer_common_interceptors.inc, can this check be moved there? eg: if real_clock_gettime exists & the interception function is not null?


Yes, but it would need to be on the `if (CanUseVDSO)` line otherwise we still get a crash. I'll update the patch.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D53528





More information about the llvm-commits mailing list