Index: win32_threads.c =================================================================== RCS file: /cvs/gcc/gcc/boehm-gc/win32_threads.c,v retrieving revision 1.10 diff -u -r1.10 win32_threads.c --- win32_threads.c 12 Mar 2002 19:06:36 -0000 1.10 +++ win32_threads.c 27 Jun 2002 01:57:30 -0000 @@ -144,8 +144,15 @@ 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