Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2012-05-22 03:02:05 +0400
committerZoltan Varga <vargaz@gmail.com>2012-05-22 03:02:27 +0400
commite7f3bbad80fe04bea1a055e870d856a22003d34d (patch)
tree47331d7dc31f24c64a92516004cb249b4a2e85df /libgc/pthread_stop_world.c
parent9755d7fdb23c5bae33a85835083834fef57748ff (diff)
Fix altstack support in libgc by registering the bounds of the normal stack and the altstack with it.
Diffstat (limited to 'libgc/pthread_stop_world.c')
-rw-r--r--libgc/pthread_stop_world.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgc/pthread_stop_world.c b/libgc/pthread_stop_world.c
index 3ecc5e9047d..e6ac64b62a8 100644
--- a/libgc/pthread_stop_world.c
+++ b/libgc/pthread_stop_world.c
@@ -290,6 +290,10 @@ static void pthread_push_all_stacks()
(unsigned long) lo, (unsigned long) hi);
#endif
if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
+ if (p->altstack && lo >= p->altstack && lo <= p->altstack + p->altstack_size)
+ hi = p->altstack + p->altstack_size;
+ /* FIXME: Need to scan the normal stack too, but how ? */
+
# ifdef STACK_GROWS_UP
/* We got them backwards! */
GC_push_all_stack(hi, lo);