aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-03 17:28:47 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-03 17:28:47 +0000
commit12494085534f9cbd6608a708e1b7fced9af3f0ed (patch)
tree855d899c9c4bb5fdc278da2c07042d5d23eef414 /boehm-gc
parentf3223fa99b8ff5d06de645944ced0739d81358d5 (diff)
Mainline merge as of 2002-06-30.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@55219 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog5
-rw-r--r--boehm-gc/win32_threads.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 2c8ab1a7a05..dc365819d4e 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-28 Hans Boehm <Hans_Boehm@hp.com>
+ Jonathan Clark
+
+ * win32_threads.c (GC_push_all_stacks): Tolerate bad sp.
+
2002-06-09 H.J. Lu (hjl@gnu.org)
* include/private/gc_locks.h (GC_test_and_set): Support
diff --git a/boehm-gc/win32_threads.c b/boehm-gc/win32_threads.c
index 38de099fa87..d5e3920cbe4 100644
--- a/boehm-gc/win32_threads.c
+++ b/boehm-gc/win32_threads.c
@@ -144,8 +144,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