<div dir="ltr">Strangely, a bounce-back email complained me being not a subscriber, but i subscribed and comfirmed already. If my message is malformed or something else, please let me know. :-)<div><br></div><div><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 16, 2015 at 12:11 AM,  <span dir="ltr"><<a href="mailto:thewhimer@gmail.com" target="_blank">thewhimer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After a second thought, that there were probably not many people using the ‘enable-multiple-vms’ option, so I decided to take some time to track it down.<br>
<br>
The OS X linker does not support linking an "extern __thread var”, I can do nothing about that.<br>
But the crash bug in pthread_get/setspecific fallback approach, turned out to be a minor issue: the pthread_key_t has to be created before used.<br>
<br>
Patch follows, but i am not sure that is the right position to fix it.<br>
<br>
<br>
diff --git a/lib/setup.c b/lib/setup.c<br>
index 1dc009d..c81de87 100644<br>
--- a/lib/setup.c<br>
+++ b/lib/setup.c<br>
@@ -16,6 +16,7 @@<br>
 #include "setup.h"<br>
 #include "mem.h"<br>
 #include "c_intf.h"<br>
+#include "os_thread.h"<br>
<br>
<br>
 /*---------------------------------------------------------------------------*/<br>
@@ -2430,6 +2431,9 @@ ___virtual_machine_state ___vms;)<br>
    * Setup virtual machine's memory management.<br>
    */<br>
<br>
+#ifndef ___THREAD_LOCAL_STORAGE_CLASS<br>
+  ___setup_thread_module ();<br>
+#endif<br>
   ___setup_mem_vmstate (___vms);<br>
<br>
   /*</blockquote></div><br></div></div></div>