summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-12-12 05:48:29 +0000
committerChristopher Faylor <me@cgf.cx>2010-12-12 05:48:29 +0000
commitf646aeb049c3ea0f157337484907f984746f4648 (patch)
tree5f5201acadd421ac8ad827ea660e161d0c7349cf
parentd7b90bae797bd70222b29ee644d7145f7ebb8631 (diff)
downloadcygnal-f646aeb049c3ea0f157337484907f984746f4648.tar.gz
cygnal-f646aeb049c3ea0f157337484907f984746f4648.tar.bz2
cygnal-f646aeb049c3ea0f157337484907f984746f4648.zip
* init.cc (search_for): Put this in shared section or suffer subtle problems
with the tls. * pinfo.cc (status_exit): Add debug output to report on unexpected exit. * tls_pbuf.cc (tmp_pathbuf::c_get): Add more details to internal error.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/init.cc2
-rw-r--r--winsup/cygwin/pinfo.cc1
-rw-r--r--winsup/cygwin/tls_pbuf.cc2
4 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index dfdba0841..1de5dee9f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-12 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * init.cc (search_for): Put this in shared section or suffer subtle
+ problems with the tls.
+ * pinfo.cc (status_exit): Add debug output to report on unexpected exit.
+ * tls_pbuf.cc (tmp_pathbuf::c_get): Add more details to internal error.
+
2010-12-09 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (RETRY_COUNT): New define.
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 0f6b67e88..fab71ba27 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -16,7 +16,7 @@ details. */
static DWORD _my_oldfunc;
-static char NO_COPY *search_for = (char *) cygthread::stub;
+static char *search_for __attribute__((section (".cygwin_dll_common"), shared)) = (char *) cygthread::stub;
unsigned threadfunc_ix[8] __attribute__((section (".cygwin_dll_common"), shared));
static bool dll_finished_loading;
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index f426bde64..03f85e548 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -138,6 +138,7 @@ status_exit (DWORD x)
x = 127;
break;
default:
+ debug_printf ("*** STATUS_%p\n", x);
x = 127;
}
return x;
diff --git a/winsup/cygwin/tls_pbuf.cc b/winsup/cygwin/tls_pbuf.cc
index f8102db8e..2190e5149 100644
--- a/winsup/cygwin/tls_pbuf.cc
+++ b/winsup/cygwin/tls_pbuf.cc
@@ -39,7 +39,7 @@ char *
tmp_pathbuf::c_get ()
{
if (tls_pbuf.c_cnt >= TP_NUM_C_BUFS)
- api_fatal ("Internal error: TP_NUM_C_BUFS too small.");
+ api_fatal ("Internal error: TP_NUM_C_BUFS too small: %u > %u", tls_pbuf.c_cnt, TP_NUM_C_BUFS);
if (!tls_pbuf.c_buf[tls_pbuf.c_cnt]
&& !(tls_pbuf.c_buf[tls_pbuf.c_cnt] = (char *) malloc (NT_MAX_PATH)))
api_fatal ("Internal error: Out of memory for new path buf.");