summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygtls.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-02-26 21:36:31 +0000
committerChristopher Faylor <me@cgf.cx>2010-02-26 21:36:31 +0000
commitd5d5bf4dd5609dd29e511d688e317b2f0f1987ca (patch)
tree01fa2b080346cfda5b393bc54c0ab387524c2f33 /winsup/cygwin/cygtls.cc
parentb6336c95b4c1d512d4cb139e7b97ec4d1ef843fc (diff)
downloadcygnal-d5d5bf4dd5609dd29e511d688e317b2f0f1987ca.tar.gz
cygnal-d5d5bf4dd5609dd29e511d688e317b2f0f1987ca.tar.bz2
cygnal-d5d5bf4dd5609dd29e511d688e317b2f0f1987ca.zip
* cygtls.h (_cygtls::init_exception_handler): Eliminate argument.
(_cygtls::andreas): Convert to a pointer. (san): Convert to a real class with methods. Use a linked list to keep track of previous handlers on the "stack". (myfault): Rewrite to use new san class rather than calling directly into _cygtls. * cygtls.cc (_cygtls::init_exception_handler): Just assume that we're always using the standard exception handler. (_cygtls::init_thread): Reflect loss of argument to init_exception_handler. * dcrt0.cc (dll_crt0_1): Ditto. * dfcn.cc (dlopen): Ditto. (dlclose): Reset the exception handler after FreeLibrary. * dll_init.cc (dll_list::detach): Make sure that the exception handler is initialized before calling destructors. * exceptions.cc (_cygtls::handle_exceptions): Accommodate new andreas pointer. * thread.cc (verifyable_object_isvalid): Pass objectptr to faulted for explicit NULL pointer checking. * tlsoffsets.h: Regenerate.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 32227e287..979d96851 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -91,7 +91,7 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
locals.process_logmask = LOG_UPTO (LOG_DEBUG);
/* Initialize this thread's ability to respond to things like
SIGSEGV or SIGFPE. */
- init_exception_handler (handle_exceptions);
+ init_exception_handler ();
}
thread_id = GetCurrentThreadId ();
@@ -226,7 +226,7 @@ _cygtls::set_siginfo (sigpacket *pack)
extern exception_list *_except_list asm ("%fs:0");
void
-_cygtls::init_exception_handler (exception_handler *eh)
+_cygtls::init_exception_handler ()
{
/* Here in the distant past of 17-Jul-2009, we had an issue where Windows
2008 became YA perplexed because the cygwin exception handler was added
@@ -249,7 +249,7 @@ _cygtls::init_exception_handler (exception_handler *eh)
the old exception handler from the list and add it to the beginning.
The next step will probably be to call this function at various points
- in cygwin (like from _cygtls::setup_fault maybe) to absoltely ensure that
+ in cygwin (like from _cygtls::setup_fault maybe) to absolutely ensure that
we have control. For now, however, this seems good enough.
(cgf 2010-02-23)
*/
@@ -275,7 +275,7 @@ _cygtls::init_exception_handler (exception_handler *eh)
Windows 2008, which irremediably gets into an endless loop, taking 100%
CPU. That's why we reverted to a normal SEH chain and changed the way
the exception handler returns to the application. */
- el.handler = eh;
+ el.handler = handle_exceptions;
el.prev = _except_list;
_except_list = &el;
}