aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-07-18 12:19:38 -0400
committerRuss Cox <rsc@golang.org>2013-07-18 12:19:38 -0400
commit249f807c39e96a30707f5005881b6c1b8e08077e (patch)
treeda4d58a2a7b299e223340f80d0db2437030a85e4 /src/pkg/runtime
parentff52cadc01756d097e5f3e3fe5ff2634d8825ffb (diff)
downloadgo-249f807c39e96a30707f5005881b6c1b8e08077e.tar.xz
runtime: mark concatstring as variadic (fixes 386 build)
Windows was the only one seeing this bug reliably in the builder, but it was easy to reproduce using 'GOGC=1 go test strconv'. concatstring looked like it took only one string, but in fact it takes a long list of strings. Add an explicit ... so that the traceback will not use the "fixed" frame size and instead look at the frame size metadata recorded by the caller. R=golang-dev TBR=golang-dev CC=golang-dev https://golang.org/cl/11531043
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/string.goc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pkg/runtime/string.goc b/src/pkg/runtime/string.goc
index 30639f9bb6..108487d69d 100644
--- a/src/pkg/runtime/string.goc
+++ b/src/pkg/runtime/string.goc
@@ -170,10 +170,13 @@ concatstring(intgo n, String *s)
return out;
}
+// NOTE: Cannot use func syntax, because we need the ...,
+// to signal to the garbage collector that this function does
+// not have a fixed size argument count.
#pragma textflag 7
-// s1 is the first of n strings.
-// the output string follows.
-func concatstring(n int, s1 String) {
+void
+runtime·concatstring(int32 n, String s1, ...)
+{
(&s1)[n] = concatstring(n, &s1);
}