Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-11-12 13:48:30 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-11-12 15:15:41 +0300
commita4b5db73c6d31c9c27aa6a69b646367cc4c48c30 (patch)
treed5c3e6b7c11cc12e7c4126b1df9f7ced8ac98a04
parentb75ad36741900449fd7564f2aab1ad8cb29cbba1 (diff)
Fix crash at process init on 64 bit XP/2003 under WOW64
* 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>
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/init.cc9
-rw-r--r--winsup/cygwin/release/2.3.114
3 files changed, 26 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2f12f322f..7876e2c7e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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-10 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (get_posix_access): Skip merging permissions if current
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 69e66a029..c6f0e3de9 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -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
index 000000000..5299d2304
--- /dev/null
+++ b/winsup/cygwin/release/2.3.1
@@ -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