]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd/tests/tsan_unittest: Avoid that this test reads from uninitialized memory
authorBart Van Assche <bvanassche@acm.org>
Sun, 14 Apr 2019 03:24:33 +0000 (20:24 -0700)
committerBart Van Assche <bvanassche@acm.org>
Thu, 18 Apr 2019 00:42:22 +0000 (17:42 -0700)
Reported-by: Philippe Waroquiers <philippe.waroquiers@skynet.be>
drd/tests/tsan_thread_wrappers_pthread.h

index 878d440e7564bc00019f515d1e14917aa7515036..45485ea85dd8df7e0ca4613130f1ef114fc09621 100644 (file)
@@ -351,11 +351,11 @@ class WriterLockScoped {  // Scoped RWLock Locker/Unlocker
 class MyThread {
  public:
   MyThread(void* (*worker)(void *), void *arg = NULL, const char *name = NULL)
-      :wpvpv_(worker), arg_(arg), name_(name) {}
+      :wpvpv_(worker), wvv_(), wvpv_(), arg_(arg), name_(name) {}
   MyThread(void (*worker)(void), void *arg = NULL, const char *name = NULL)
-      :wvv_(worker), arg_(arg), name_(name) {}
+      :wpvpv_(), wvv_(worker), wvpv_(), arg_(arg), name_(name) {}
   MyThread(void (*worker)(void *), void *arg = NULL, const char *name = NULL)
-      :wvpv_(worker), arg_(arg), name_(name) {}
+      :wpvpv_(), wvv_(), wvpv_(worker), arg_(arg), name_(name) {}
 
   void Start() { CHECK(0 == pthread_create(&t_, NULL, ThreadBody, this));}
   void Join()  { CHECK(0 == pthread_join(t_, NULL));}