diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-11-07 11:45:21 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-11-07 11:45:21 -0500 |
commit | 8ec8b8941d7d90d50aab2f067253804d043108c4 (patch) | |
tree | e2ef539f8c1f0eee77423e569ed41c96f2a4bbad | |
parent | 387e86d2ab99e3b354f101d213aa8397633865c8 (diff) | |
download | haskell-8ec8b8941d7d90d50aab2f067253804d043108c4.tar.gz |
rts/nonmoving: Catch failure of createOSThread
-rw-r--r-- | rts/sm/NonMoving.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/sm/NonMoving.c b/rts/sm/NonMoving.c index 50cf784aab..20ec5a45ba 100644 --- a/rts/sm/NonMoving.c +++ b/rts/sm/NonMoving.c @@ -896,8 +896,10 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads) concurrent_coll_running = true; nonmoving_write_barrier_enabled = true; debugTrace(DEBUG_nonmoving_gc, "Starting concurrent mark thread"); - createOSThread(&mark_thread, "non-moving mark thread", - nonmovingConcurrentMark, mark_queue); + if (createOSThread(&mark_thread, "non-moving mark thread", + nonmovingConcurrentMark, mark_queue) != 0) { + barf("nonmovingCollect: failed to spawn mark thread: %s", strerror(errno)); + } } else { nonmovingConcurrentMark(mark_queue); } |