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
crash stack overflow when printing value of self referencing struct
Description
When a structure refers to itself (e.g. linked list, tree ...etc), printing its value with %v flag causes the VM to crash.
In go this program displays &{user [] [] <nil> <nil>} and run with no problem.
I think it could come from infinite recursive on self referencing struct, i would like to assign myself to the issue and work on a fix in the next days 🚀
The text was updated successfully, but these errors were encountered:
Thanks for the issue; I'll close this as a won't fix as a real solution for printing these structures in gonative would require named type support in reflect.
crash stack overflow when printing value of self referencing struct
Description
When a structure refers to itself (e.g. linked list, tree ...etc), printing its value with %v flag causes the VM to crash.
In go this program displays
&{user [] [] <nil> <nil>}
and run with no problem.Related: #1315
program:
Your environment
Expected behaviour
print
&{user [] [] <nil> <nil>}
Actual behaviour
crash w/ stack overflow
Proposed solution
I think it could come from infinite recursive on self referencing struct, i would like to assign myself to the issue and work on a fix in the next days 🚀
The text was updated successfully, but these errors were encountered: