summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-14 21:02:52 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-14 21:02:52 +0000
commit6cdf7b4504d9ecbcfed19472f8c8edbfb389f643 (patch)
tree5847e1daa22295214507c41c69acc9520627c035 /libgo
parent3597d08115537fa122acf34d69e0a1852b1b6577 (diff)
downloadlinaro-gcc-6cdf7b4504d9ecbcfed19472f8c8edbfb389f643.tar.gz
linaro-gcc-6cdf7b4504d9ecbcfed19472f8c8edbfb389f643.tar.bz2
linaro-gcc-6cdf7b4504d9ecbcfed19472f8c8edbfb389f643.zip
runtime: Don't clobber saved context when catching signal.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203577 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/go-signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index 9771b71cfcf..af99ddefeb1 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -399,6 +399,7 @@ sig_tramp_info (int sig, Siginfo *info, void *context)
{
G *gp;
M *mp;
+ void *stack_context[10];
/* We are now running on the stack registered via sigaltstack.
(Actually there is a small span of time between runtime_siginit
@@ -409,7 +410,7 @@ sig_tramp_info (int sig, Siginfo *info, void *context)
if (gp != NULL)
{
#ifdef USING_SPLIT_STACK
- __splitstack_getcontext (&gp->stack_context[0]);
+ __splitstack_getcontext (&stack_context[0]);
#endif
}
@@ -432,7 +433,7 @@ sig_tramp_info (int sig, Siginfo *info, void *context)
if (gp != NULL)
{
#ifdef USING_SPLIT_STACK
- __splitstack_setcontext (&gp->stack_context[0]);
+ __splitstack_setcontext (&stack_context[0]);
#endif
}
}