From 573d25a42342ae094edeafc7066646cf825eb255 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Thu, 30 May 2013 14:11:49 +0400 Subject: [PATCH] runtime: mark runtime.goexit as nosplit Required for preemptive scheduler, see the comment. R=golang-dev, daniel.morsing CC=golang-dev https://golang.org/cl/9841047 --- src/pkg/runtime/proc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 7581b35d0b..c7a8d24182 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -1223,6 +1223,10 @@ gosched0(G *gp) } // Finishes execution of the current goroutine. +// Need to mark it as nosplit, because it runs with sp > stackbase (as runtime·lessstack). +// Since it does not return it does not matter. But if it is preempted +// at the split stack check, GC will complain about inconsistent sp. +#pragma textflag 7 void runtime·goexit(void) { -- 2.48.1