aboutsummaryrefslogtreecommitdiffstats
path: root/inits.c
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2020-06-30 22:19:18 +0100
committerAaron Patterson <aaron.patterson@gmail.com>2020-09-10 08:48:51 -0700
commitef22af4db0e38db406cfc46987cbe03582de2da0 (patch)
treeebee7c25afce4527d5c23dd0481143ad2d4b7223 /inits.c
parent867204c4a558f318be9d39da47298d5ccc85ff17 (diff)
downloadruby-ef22af4db0e38db406cfc46987cbe03582de2da0.tar.gz
If the GC runs before the Mutex's are initialised then we get a crash in pthread_mutex_lock.
It is possible for GC to run during initialisation due to objects being allocated
Diffstat (limited to 'inits.c')
-rw-r--r--inits.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/inits.c b/inits.c
index a3eec164bb..f8eba911d5 100644
--- a/inits.c
+++ b/inits.c
@@ -20,6 +20,7 @@ static void Init_builtin_prelude(void);
void
rb_call_inits(void)
{
+ CALL(Thread_Mutex);
#if USE_TRANSIENT_HEAP
CALL(TransientHeap);
#endif