rts: Ensure that task->id is initialized
authorBen Gamari <bgamari.foss@gmail.com>
Sat, 8 Dec 2018 04:25:53 +0000 (23:25 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sat, 8 Dec 2018 04:26:02 +0000 (23:26 -0500)
Reviewers: erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5325

rts/Task.c

index ac86311..11ba5f1 100644 (file)
@@ -220,6 +220,7 @@ newTask (bool worker)
 #if defined(THREADED_RTS)
     initCondition(&task->cond);
     initMutex(&task->lock);
+    task->id = 0;
     task->wakeup = false;
     task->node = 0;
 #endif