diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-04-17 09:42:29 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-04-17 12:50:55 +0300 |
commit | 82c8af1a73c54768aba43648849eb8592cbae361 (patch) | |
tree | 0d429beb6923b4a6da85403c9dc750c8a730330c /pthread_stop_world.c | |
parent | 83e997eb65cf2d52a649617f6a31d4af6fef8fb8 (diff) | |
download | bdwgc-82c8af1a73c54768aba43648849eb8592cbae361.tar.gz |
Assert that thread bs_end is null before GET_PROCEDURE_STACK_LOCAL
Issue #411 (bdwgc).
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && E2K]
(GC_suspend_handler_inner): Add assertion that me->backing_store_end
is null before GET_PROCEDURE_STACK_LOCAL().
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r-- | pthread_stop_world.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 9053787d..2f85457f 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -357,6 +357,7 @@ STATIC void GC_suspend_handler_inner(ptr_t dummy GC_ATTR_UNUSED, if (ao_load_async(&me->suspended_ext)) { GC_store_stack_ptr(me); # ifdef E2K + GC_ASSERT(NULL == me -> backing_store_end); GET_PROCEDURE_STACK_LOCAL(&bs_lo, &stack_size); me -> backing_store_end = bs_lo; me -> backing_store_ptr = bs_lo + stack_size; @@ -387,6 +388,7 @@ STATIC void GC_suspend_handler_inner(ptr_t dummy GC_ATTR_UNUSED, } GC_store_stack_ptr(me); # ifdef E2K + GC_ASSERT(NULL == me -> backing_store_end); GET_PROCEDURE_STACK_LOCAL(&bs_lo, &stack_size); me -> backing_store_end = bs_lo; me -> backing_store_ptr = bs_lo + stack_size; |