diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-04-06 09:12:20 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-04-06 13:17:41 +0300 |
commit | 30b3f419d3eea97ceda2465ea1ef0267752e2f5f (patch) | |
tree | c3f5fc6105eadfe693ef2eff1f15ffc600d60e3a /pthread_stop_world.c | |
parent | fa2cc313eb64cff42a0e1724aee0122be2f034a8 (diff) | |
download | bdwgc-30b3f419d3eea97ceda2465ea1ef0267752e2f5f.tar.gz |
Add assertion to verify GC_threads hash table entries are chained properly
(refactoring)
* darwin_stop_world.c (GC_push_all_stacks): Add assertion that thread
entry is located in the proper hash table chain (by id).
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* win32_threads.c (GC_push_all_stacks): Likewise.
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r-- | pthread_stop_world.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c index d45b8a17..0c0c7b53 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -800,6 +800,7 @@ GC_INNER void GC_push_all_stacks(void) # endif GC_stack_context_t crtn = p -> crtn; + GC_ASSERT(THREAD_TABLE_INDEX(p -> id) == i); if (KNOWN_FINISHED(p)) continue; ++nthreads; traced_stack_sect = crtn -> traced_stack_sect; |