This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libgo patch committed: Don't clobber context when catching signal
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Ian Lance Taylor <iant at google dot com>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Wed, 16 Oct 2013 09:24:12 +0200
- Subject: Re: libgo patch committed: Don't clobber context when catching signal
- Authentication-results: sourceware.org; auth=none
Hello!
> This patch to libgo fixes a dumb bug in which catching a signal via the
> os/signal package could clobber the saved split-stack context, leading
> to disaster if the signal arrived at the wrong time. Bootstrapped and
> ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
> Will commit to 4.8 branch when it reopens.
Attached patch is re-enables bootstrap on targets without split stack
due to unused variable warning. The patch was tested on
alphaev68-linux-gnu [1].
[1] http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01200.html
Uros.
Index: runtime/go-signal.c
===================================================================
--- runtime/go-signal.c (revision 203610)
+++ runtime/go-signal.c (working copy)
@@ -399,7 +399,9 @@
{
G *gp;
M *mp;
+#ifdef USING_SPLIT_STACK
void *stack_context[10];
+#endif
/* We are now running on the stack registered via sigaltstack.
(Actually there is a small span of time between runtime_siginit