spew fails to detect cyclic data
cpcallen opened this issue · comments
Christopher Allen commented
The following runs forever(*) without producing any output:
package main
import "github.com/davecgh/go-spew/spew"
func main() {
type loop *loop
var loop1, loop2 loop
loop1 = &loop2
loop2 = &loop1
spew.Dump(&loop1)
}
(*) It does not hit the stack size limit; its memory usage does keep growing so obviously it will eventually run out of swap or virtual address space...
Dmitri Shuralyov commented
#53 is possibly related.
Christopher Allen commented
I was going to say there was no interface values involved here, but of course the param to Dump is itself of interface type. So yes: entirely possible that this is related.