* 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.
This commit is contained in:
@ -124,9 +124,7 @@ verifyable_object_isvalid (void const *objectptr, thread_magic_t magic, void *st
|
||||
void *static_ptr2, void *static_ptr3)
|
||||
{
|
||||
myfault efault;
|
||||
/* Check for NULL pointer specifically since it is a cheap test and avoids the
|
||||
overhead of setting up the fault handler. */
|
||||
if (!objectptr || efault.faulted ())
|
||||
if (efault.faulted (objectptr))
|
||||
return INVALID_OBJECT;
|
||||
|
||||
verifyable_object **object = (verifyable_object **) objectptr;
|
||||
|
Reference in New Issue
Block a user