(LPCONTEXT)&thread_table[i].context))
ABORT("GetThreadContext failed");
# ifdef I386
- if (thread_table[i].context.Esp >= (DWORD)thread_table[i].stack
- || thread_table[i].context.Esp < (DWORD)bottom)
- ABORT("Thread stack pointer out of range");
GC_push_one ((word) thread_table[i].context.Edi);
GC_push_one ((word) thread_table[i].context.Esi);
GC_push_one ((word) thread_table[i].context.Ebp);
GC_push_one ((word) thread_table[i].context.Edx);
GC_push_one ((word) thread_table[i].context.Ecx);
GC_push_one ((word) thread_table[i].context.Eax);
- GC_push_all_stack((char *) thread_table[i].context.Esp,
- thread_table[i].stack);
+ if (thread_table[i].context.Esp >= (DWORD)thread_table[i].stack
+ || thread_table[i].context.Esp < (DWORD)bottom) {
+ WARN("Thread stack pointer 0x%lx out of range, pushing everything",
+ thread_table[i].context.Esp);
+ GC_push_all_stack((char *) bottom, thread_table[i].stack);
+ } else {
+ GC_push_all_stack((char *) thread_table[i].context.Esp,
+ thread_table[i].stack);
+ }
# else
# ifdef ARM32
if (thread_table[i].context.Sp >= (DWORD)thread_table[i].stack
/* Clear the thread entry even if we exit with an exception. */
/* This is probably pointless, since an uncaught exception is */
/* supposed to result in the process being killed. */
+#ifndef __GNUC__
__try {
+#endif /* __GNUC__ */
ret = args.start (args.param);
+#ifndef __GNUC__
} __finally {
+#endif /* __GNUC__ */
LOCK();
args.entry->stack = 0;
args.entry->in_use = FALSE;
/* cast away volatile qualifier */
BZERO((void *) &args.entry->context, sizeof(CONTEXT));
UNLOCK();
+#ifndef __GNUC__
}
+#endif /* __GNUC__ */
return ret;
}
LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info);
+#ifdef GC_DLL
+
/*
* This isn't generally safe, since DllMain is not premptible.
* If another thread holds the lock while this runs we're in trouble.
return TRUE;
}
+# endif /* GC_DLL */
+
# endif /* !MSWINCE */
#endif /* GC_WIN32_THREADS */