summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 76b1e98b..18bbc025 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -401,7 +401,8 @@ GC_INNER void GC_push_all_stacks(void)
for (i = 0; i < THREAD_TABLE_SZ; i++) {
GC_thread p;
- for (p = GC_threads[i]; p != NULL; p = p -> tm.next)
+ for (p = GC_threads[i]; p != NULL; p = p -> tm.next) {
+ GC_ASSERT(THREAD_TABLE_INDEX(p -> id) == i);
if (!KNOWN_FINISHED(p)) {
thread_act_t thread = (thread_act_t)(p -> mach_thread);
ptr_t lo = GC_stack_range_for(&hi, thread, p, my_thread,
@@ -418,6 +419,7 @@ GC_INNER void GC_push_all_stacks(void)
}
nthreads++;
}
+ }
} /* for (i=0; ...) */
}