Use of uninitialised value during construction of cell's periodic worker thread
Within the PeriodicWorkerThread
class, the condition variable mConditionVar
is initialised after the thread. However, the thread currently started when it is constructed, meaning that depending on how quickly the new thread is created, the thread could access uninitialised values within the condition variable object.
Instead, the thread should not be created until after the condition variable has been fully constructed.
This was discovered when running the example SWATCH cell under valgrind a few weeks ago.