diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-13 13:50:13 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-13 13:50:13 +0000 |
commit | 56fc16a1120d09971adb2fb2159cdf3d3871524e (patch) | |
tree | 00437b121f34212f4321eee7b66a49399fe12d37 /libgo | |
parent | 9d05e48d26abcee8fafaf3c71b9f305b38777bfb (diff) | |
download | gcc-56fc16a1120d09971adb2fb2159cdf3d3871524e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211639 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/proc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 1e1551989cb..d2130844717 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; } |