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...
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.
The following runs forever(*) without producing any output:
(*) 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...