]> sourceware.org Git - newlib-cygwin.git/commitdiff
Fix crash at process init on 64 bit XP/2003 under WOW64
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 12 Nov 2015 10:48:30 +0000 (11:48 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 12 Nov 2015 10:48:30 +0000 (11:48 +0100)
* init.cc (munge_threadfunc): Don't call NtQueryInformationThread with
ThreadQuerySetWin32StartAddress info class on XP 64 and Server 2003 64.
It crashes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/ChangeLog
winsup/cygwin/init.cc
winsup/cygwin/release/2.3.1 [new file with mode: 0644]

index 0e96d150e511a9c9cf893b8e06fca949559fcb32..8e40c2f31fe4b3bd47ad7da754b89f79deabac1f 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-12  Corinna Vinschen  <corinna@vinschen.de>
+
+       * init.cc (munge_threadfunc): Don't call NtQueryInformationThread with
+       ThreadQuerySetWin32StartAddress info class on XP 64 and Server 2003 64.
+       It crashes.
+
 2015-11-09  Corinna Vinschen  <corinna@vinschen.de>
 
        * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 1.
index 69e66a0290a5fbad755347475d93f4a38e525c18..c6f0e3de98ccf75c52abc975d93069580ecebeb9 100644 (file)
@@ -57,9 +57,12 @@ munge_threadfunc ()
     {
       char *threadfunc = NULL;
 
-      NtQueryInformationThread (NtCurrentThread (),
-                               ThreadQuerySetWin32StartAddress,
-                               &threadfunc, sizeof threadfunc, NULL);
+      if (wincap.wow64_has_secondary_stack ())
+       threadfunc = ebp[threadfunc_ix[0]];
+      else
+       NtQueryInformationThread (NtCurrentThread (),
+                                 ThreadQuerySetWin32StartAddress,
+                                 &threadfunc, sizeof threadfunc, NULL);
       if (!search_for || threadfunc == search_for)
        {
          search_for = NULL;
diff --git a/winsup/cygwin/release/2.3.1 b/winsup/cygwin/release/2.3.1
new file mode 100644 (file)
index 0000000..5299d23
--- /dev/null
@@ -0,0 +1,14 @@
+What's new:
+-----------
+
+
+What changed:
+-------------
+
+
+Bug Fixes
+---------
+
+- The fix for wine introduced in 2.3.0 crashes in 32 bit Cygwin on 64 bit XP
+  and 64 bit Server 2003 only.   This should work now.
+  Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00187.html
This page took 0.037051 seconds and 5 git commands to generate.