summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-12-09 20:32:24 +0000
committerChristopher Faylor <me@cgf.cx>2013-12-09 20:32:24 +0000
commitae8456bdf2bd8d7a9b3a5ef0b18169caa7548189 (patch)
tree947d4df6505cfa920a119112cefd106df51e8da2 /winsup/cygwin/exceptions.cc
parentdb0d50a67d788f0163b7ea2bad17b966f1e43512 (diff)
downloadcygnal-ae8456bdf2bd8d7a9b3a5ef0b18169caa7548189.tar.gz
cygnal-ae8456bdf2bd8d7a9b3a5ef0b18169caa7548189.tar.bz2
cygnal-ae8456bdf2bd8d7a9b3a5ef0b18169caa7548189.zip
* globals.cc (hntdll): Define/declare.
* exceptions.cc (inside_kernel): Don't call GetModuleFileName if we know we're in ntdll. * sigproc.cc (wait_sig): Initialize hntdll.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index c0fb0c877..98eb78760 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -394,6 +394,9 @@ _cygtls::inside_kernel (CONTEXT *cx)
# define h ((HMODULE) m.AllocationBase)
if (!h || m.State != MEM_COMMIT) /* Be defensive */
res = true;
+ else if (h == hntdll)
+ res = true; /* Calling GetModuleFilename on ntdll.dll
+ can hang */
else if (h == user_data->hmodule)
res = false;
else if (!GetModuleFileNameW (h, checkdir, windows_system_directory_length + 6))