runtime: Save all registers on stack for GC scan.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 10 Feb 2012 15:52:37 +0000 (15:52 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 10 Feb 2012 15:52:37 +0000 (15:52 +0000)
From-SVN: r184098

libgo/runtime/mgc0.c

index bd634d533e9461680358a5f6b92ceef86b558c82..73c399df239ed0eee8eda4665b273002ec92b179 100644 (file)
@@ -936,6 +936,10 @@ runtime_gc(int32 force)
        const byte *p;
        bool extra;
 
+       // Make sure all registers are saved on stack so that
+       // scanstack sees them.
+       __builtin_unwind_init();
+
        // The gc is turned off (via enablegc) until
        // the bootstrap has completed.
        // Also, malloc gets called in the guts