Work around a Mac OS libc bug.
If you're dismantling the alternate signal stack the ss_size field should be
ignored, but isn't on Mac OS.
Change-Id: Id6e93ed5089e375f0bd84a68efee36c34462cdf0
diff --git a/src/thread.cc b/src/thread.cc
index 24697ce..04c5105 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -220,7 +220,7 @@
// Tell the kernel to stop using it.
ss.ss_sp = NULL;
ss.ss_flags = SS_DISABLE;
- ss.ss_size = 0;
+ ss.ss_size = SIGSTKSZ; // Avoid ENOMEM failure with Mac OS' buggy libc.
SigAltStack(&ss, NULL);
// Free it.