Page MenuHomePhabricator

Work around a linux libc bug causing a crash in TaskPool

Authored by labath on Apr 15 2016, 3:00 AM.



Doing a pthread_detach while the thread is exiting can cause crashes or other mischief, so we
make sure the thread stays around long enough. The performance impact of the added
synchronization should be minimal, as the parent thread is already holding a mutex, so I am just
making sure it holds it for a little while longer. It's possible the new thread will block on
this mutex immediately after startup, but it should be unblocked really quickly and some
blocking is unavoidable if we actually want to have this synchronization.

Diff Detail


Event Timeline

labath updated this revision to Diff 53865.Apr 15 2016, 3:00 AM
labath retitled this revision from to Work around a linux libc bug causing a crash in TaskPool.
labath updated this object.
labath added a reviewer: tberghammer.
labath added a subscriber: lldb-commits.
tberghammer accepted this revision.Apr 15 2016, 3:39 AM
tberghammer edited edge metadata.

Looks good

This revision is now accepted and ready to land.Apr 15 2016, 3:39 AM
This revision was automatically updated to reflect the committed changes.