You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think fmt.Printf() can learn from reflect.DeepEqual(), use a make(map[visit]bool) to avoid infinite loop on nested data.
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
fmt.Printf("%#v", v) stack overflow when print nested data
fmt: Printf("%#v", v) stack overflow when print nested data
Nov 30, 2015
Infinite recursion can also be triggered by self-referential data structures, such as a slice that contains itself as an element, if that type has a String method. Such pathologies are rare, however, and the package does not protect against them.
The code:
Error message:
I think
fmt.Printf()
can learn fromreflect.DeepEqual()
, use amake(map[visit]bool)
to avoid infinite loop on nested data.The text was updated successfully, but these errors were encountered: