Commit aa63a928 authored by Lorenzo Stoakes's avatar Lorenzo Stoakes Committed by Russ Cox

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
parent 2cb6fcf6
......@@ -1450,7 +1450,7 @@ Tconv(Fmt *fp)
if(t == T)
return fmtstrcpy(fp, "<T>");
if(t->trecur > 4)
if(t->trecur > 4 || fp->nfmt > 1000)
return fmtstrcpy(fp, "<...>");
t->trecur++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment