summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-09 13:58:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-09 13:58:09 +0000
commit9abe121c9f1679900a559c780d102e796cb61e5e (patch)
treeef1d69a2f630a3abf8319a2fe9bf75eec03607c8 /thread.c
parenta4d8a6e1489dd14e4fb83ea2181efec92935fec5 (diff)
thread.c: workaround for valgrind on Mac OS X
Without this hack, pthread_join() in rb_thread_stop_timer_thread() segfaults. ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G1510 valgrind-3.12.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 74cdf4f3c7..4578cbe7f6 100644
--- a/thread.c
+++ b/thread.c
@@ -77,6 +77,9 @@
#define RUBY_THREAD_PRIORITY_MIN -3
#endif
+#if defined HAVE_VALGRIND_MEMCHECK_H && __APPLE__
+#define THREAD_DEBUG -1
+#endif
#ifndef THREAD_DEBUG
#define THREAD_DEBUG 0
#endif