Fixes a hang that can occur if a signal comes in during malloc calls.
authorChris Bieneman <beanz@apple.com>
Mon, 27 Apr 2015 20:45:35 +0000 (20:45 +0000)
committerChris Bieneman <beanz@apple.com>
Mon, 27 Apr 2015 20:45:35 +0000 (20:45 +0000)
commit017ebf09d97e209a4d228be8ab24582251ac025f
tree3cc6fa8aabbe60f17b580650f97eaa26d58962e3
parente71db85beda3b82ad9aaf38c5eba9212e53a7071
Fixes a hang that can occur if a signal comes in during malloc calls.

We need to dereference the signals mutex during handler registration so that we force its construction. This is to prevent the first use being during handling an actual signal because you can't safely allocate memory in a signal handler.

llvm-svn: 235914
llvm/lib/Support/Unix/Signals.inc