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
Bug in cycle detection reported in #95. Thank you @alingse. This issue is to track the bug itself as opposed to the fix. Description below copied from #95.
use visited map[visit]int to check cycle might get some bad case.
the key reason was that, all the pp, pprinter share a same map[visit]int
but when we process a struct refer a pointer value twice or more, this is not a cycle, it's just a repeat refer.
maybe use other helper data type for every branch when we call code pp = *p statement
Bug in cycle detection reported in #95. Thank you @alingse. This issue is to track the bug itself as opposed to the fix. Description below copied from #95.
use
visited map[visit]int
to check cycle might get some bad case.the key reason was that, all the
pp
,p
printer
share a samemap[visit]int
but when we process a struct refer a pointer value twice or more, this is not a cycle, it's just a repeat refer.
maybe use other helper data type for every branch when we call code
pp = *p
statementmaybe a
slice
is enough to detect.only branch3 should print a "CYCLIC REFERENCE"
The text was updated successfully, but these errors were encountered: