diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 15:55:37 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 15:55:37 +0000 |
commit | ee29ae309e17ce727ea0dc120d254b42d37c9dc3 (patch) | |
tree | 8770c0f5bccaee68a3f7834aba680b2fb2102b06 /libgo/runtime | |
parent | 2ee9794645e78f534be6dabd94ca2f3f707b536f (diff) | |
download | gcc-ee29ae309e17ce727ea0dc120d254b42d37c9dc3.tar.gz |
runtime: For g0 set stack_size to 0 when not -fsplit-stack.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/proc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 42a5779bc99..94c2a51730e 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -909,7 +909,9 @@ runtime_mstart(void* mp) __splitstack_getcontext(&g->stack_context[0]); #else g->gcinitial_sp = ∓ - g->gcstack_size = StackMin; + // Setting gcstack_size to 0 is a marker meaning that gcinitial_sp + // is the top of the stack, not the bottom. + g->gcstack_size = 0; g->gcnext_sp = ∓ #endif getcontext(&g->context); @@ -1267,6 +1269,8 @@ __go_go(void (*fn)(void*), void* arg) #else sp = newg->gcinitial_sp; spsize = newg->gcstack_size; + if(spsize == 0) + runtime_throw("bad spsize in __go_go"); newg->gcnext_sp = sp; #endif } else { |