This is the mail archive of the 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]

Go patch committed: Initialize frame variable

In the change, committed to the
GCC repo in ,
the initialization of the compiler-generated frame variable was
accidentally lost.  When the variable happened to be initialized to a
non-zero value on the stack, this could cause a stack unwind to
terminate early, so that a function that defers a function that recovers
a panic and then panics again might wind up returning when really the
stack unwind should go up to the next higher function that defers a
function that recovers a panic.  This patch fixes the problem.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.


diff -r 9fe29170ed7b go/
--- a/go/	Fri Aug 15 15:13:53 2014 -0700
+++ b/go/	Fri Aug 15 17:47:32 2014 -0700
@@ -5176,6 +5176,8 @@
               gogo->backend()->init_statement(vars[i], var_inits[i]);
+      if (defer_init != NULL)
+	init.push_back(defer_init);
       Bstatement* var_init = gogo->backend()->statement_list(init);
       // Initialize all variables before executing this code block.

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