OSDN Git Service

* init.cc (dll_entry): Call prime_threads after dll_crt0_0 to avoid conflicts
authorcgf <cgf>
Fri, 16 Dec 2005 20:40:02 +0000 (20:40 +0000)
committercgf <cgf>
Fri, 16 Dec 2005 20:40:02 +0000 (20:40 +0000)
between heap allocation and thread stack allocation.

winsup/cygwin/ChangeLog
winsup/cygwin/init.cc

index 85fe362..3ae7043 100644 (file)
@@ -1,5 +1,10 @@
 2005-12-16  Christopher Faylor  <cgf@timesys.com>
 
+       * init.cc (dll_entry): Call prime_threads after dll_crt0_0 to avoid
+       conflicts between heap allocation and thread stack allocation.
+
+2005-12-16  Christopher Faylor  <cgf@timesys.com>
+
        * hookapi.cc (putmem): Remove query of previous memory protection since
        we get that for free the first time we call VirtualProtect.
 
index 655d891..59e59cc 100644 (file)
@@ -160,8 +160,8 @@ dll_entry (HANDLE h, DWORD reason, void *static_load)
          && is_wow64_proc)
        respawn_wow64_process ();
 
-      prime_threads ();
       dll_crt0_0 ();
+      prime_threads ();        // this should be the last thing to happen
       break;
     case DLL_PROCESS_DETACH:
       break;