aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2014-06-13 13:50:13 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2014-06-13 13:50:13 +0000
commiteec40eac8300a2edf346e61304da7988f4ac91cc (patch)
tree00437b121f34212f4321eee7b66a49399fe12d37 /libgo
parentf6c438246c239c86847cb38bedcb7d85711b1863 (diff)
downloadgcc-eec40eac8300a2edf346e61304da7988f4ac91cc.zip
gcc-eec40eac8300a2edf346e61304da7988f4ac91cc.tar.gz
gcc-eec40eac8300a2edf346e61304da7988f4ac91cc.tar.bz2
re PR go/61498 (Many 64-bit Go tests SEGV in scanblock)
PR go/61498 runtime: Always set gcnext_sp to pointer-aligned address. The gcnext_sp field is only used on systems that do not use split stacks. It marks the bottom of the stack for the garbage collector. This change makes sure that the stack bottom is always aligned to a pointer value. Previously the garbage collector would align all the addresses that it scanned, but it now expects them to be aligned before scanning. From-SVN: r211639
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/proc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 1e15519..d213084 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -255,9 +255,6 @@ runtime_mcall(void (*pfn)(G*))
{
M *mp;
G *gp;
-#ifndef USING_SPLIT_STACK
- int i;
-#endif
// Ensure that all registers are on the stack for the garbage
// collector.
@@ -273,7 +270,7 @@ runtime_mcall(void (*pfn)(G*))
#ifdef USING_SPLIT_STACK
__splitstack_getcontext(&g->stack_context[0]);
#else
- gp->gcnext_sp = &i;
+ gp->gcnext_sp = &pfn;
#endif
gp->fromgogo = false;
getcontext(&gp->context);
@@ -1933,7 +1930,7 @@ doentersyscall()
&g->gcinitial_sp);
#else
{
- uint32 v;
+ void *v;
g->gcnext_sp = (byte *) &v;
}