OSDN Git Service

* config/xtensa/xtensa.h (LIBGCC2_WORDS_BIG_ENDIAN): Set this
[pf3gnuchains/gcc-fork.git] / boehm-gc / win32_threads.c
index 38de099..9987fc6 100644 (file)
@@ -134,9 +134,6 @@ void GC_push_all_stacks()
                                (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);
@@ -144,8 +141,15 @@ void GC_push_all_stacks()
          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