From a566deace1d96cd517e79227937e3036baca7ee2 Mon Sep 17 00:00:00 2001 From: Akshat Kumar Date: Fri, 8 Mar 2013 00:54:44 +0100 Subject: syscall: Plan 9: use lightweight errstr in entersyscall mode Change 231af8ac63aa (CL 7314062) made runtime.enteryscall() set m->mcache = nil, which means that we can no longer use syscall.errstr in syscall.Syscall and syscall.Syscall6, since it requires a new buffer to be allocated for holding the error string. Instead, we use pre-allocated per-M storage to hold error strings from syscalls made while in entersyscall mode, and call runtime.findnull to calculate the lengths. Fixes #4994. R=rsc, rminnich, ality, dvyukov, rminnich, r CC=golang-dev https://golang.org/cl/7567043 --- src/pkg/runtime/runtime.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pkg/runtime/runtime.h') diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index e44064f1ae..66bcf603bd 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -320,6 +320,7 @@ struct M #endif #ifdef GOOS_plan9 int8* notesig; + byte* errstr; #endif SEH* seh; uintptr end[]; -- cgit v1.3-5-g9baa