Patchwork libgo patch committed: Fix argument passed to forcegchelper

login
register
mail settings
Submitter Ian Taylor
Date Feb. 5, 2013, 11:59 p.m.
Message ID <mcrip668g8q.fsf@google.com>
Download mbox | patch
Permalink /patch/218464/
State New
Headers show

Comments

Ian Taylor - Feb. 5, 2013, 11:59 p.m.
I got confused about the code where the heap scavenger starts
forcegchelper in libgo.  This patch corrects the argument passed in.
This should fix the segmentation violation reported in PR 56172.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu, where it
is less important because the code uses futexes rather than semaphores.
Committed to mainline.

Ian

Patch

diff -r 192e2bd0c012 libgo/runtime/mheap.c
--- a/libgo/runtime/mheap.c	Tue Feb 05 14:21:50 2013 -0800
+++ b/libgo/runtime/mheap.c	Tue Feb 05 15:56:49 2013 -0800
@@ -405,7 +405,7 @@ 
 			// GC blocks other goroutines via the runtime_worldsema.
 			runtime_noteclear(&note);
 			notep = &note;
-			__go_go(forcegchelper, (void*)&notep);
+			__go_go(forcegchelper, (void*)notep);
 			runtime_entersyscall();
 			runtime_notesleep(&note);
 			runtime_exitsyscall();