This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgo patch committed: Don't clobber context when catching signal


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]