Skip to content

Commit

Permalink
fix tauClock msan false positive on linux
Browse files Browse the repository at this point in the history
When running a test with memory sanitizer on linux a false possitive
occurs because ts is not initialized.
  • Loading branch information
cpradog committed Mar 10, 2024
1 parent 95448f3 commit 20754d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tau/tau.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static inline double tauClock() {
return TAU_CAST(double, clock()) * 1000000000 / CLOCKS_PER_SEC; // in nanoseconds

#elif defined(__linux)
struct timespec ts;
struct timespec ts = {0, 0};
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
timespec_get(&ts, TIME_UTC);
#else
Expand Down

0 comments on commit 20754d8

Please sign in to comment.