From 82c8af1a73c54768aba43648849eb8592cbae361 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 17 Apr 2022 09:42:29 +0300 Subject: 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(). --- pthread_stop_world.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pthread_stop_world.c') 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; -- cgit v1.2.1