From 8a4bd094a033ceb00f7f5a504e4bc652ea5a164d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 9 Jan 2012 09:45:08 -0800 Subject: [PATCH] undo CL 5504108 / 0edee03791f4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit breaks 386 build ««« original CL description gc: put limit on size of exported recursive interface Prevents edge-case recursive types from consuming excessive memory. Fixes #1909. R=golang-dev, lvd, rsc CC=golang-dev https://golang.org/cl/5504108 »»» R=lvd, lvd CC=golang-dev https://golang.org/cl/5534049 --- src/cmd/gc/fmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/fmt.c b/src/cmd/gc/fmt.c index 3013d0d3293..f3be53c8fbf 100644 --- a/src/cmd/gc/fmt.c +++ b/src/cmd/gc/fmt.c @@ -1450,7 +1450,7 @@ Tconv(Fmt *fp) if(t == T) return fmtstrcpy(fp, ""); - if(t->trecur > 4 || fp->nfmt > 1000) + if(t->trecur > 4) return fmtstrcpy(fp, "<...>"); t->trecur++;