summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-29 10:15:11 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-29 10:15:11 (GMT)
commitc95467e597963a3016ba918235c4400c6e00adb5 (patch)
treeb2211e5a51112fa1cfda2ba505f02aa3057a1d55 /vm_core.h
parent01d81d19915eb931773e095c2aee46c16c441e23 (diff)
thread_pthread.c: clear altstacks in thread cache at GVL destruction
Otherwise, an altstack may live past ObjectSpace destruction and xfree-ing the altstack will segfault. [ruby-core:85621] [Feature #14487] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 67c384c..c05acb8 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -123,9 +123,11 @@
void *rb_register_sigaltstack(void);
# define RB_ALTSTACK_INIT(var) var = rb_register_sigaltstack()
# define RB_ALTSTACK_FREE(var) xfree(var)
+# define RB_ALTSTACK(var) var
#else /* noop */
# define RB_ALTSTACK_INIT(var)
# define RB_ALTSTACK_FREE(var)
+# define RB_ALTSTACK(var) (0)
#endif
/*****************/