fixes a critical =trace generation bug (see test case) (#14140)
This commit is contained in:
parent
2f1aad0264
commit
065a6af2de
3 changed files with 22 additions and 2 deletions
|
|
@ -13,8 +13,24 @@ proc main(x: int) =
|
|||
let m = n
|
||||
n.kids.add m
|
||||
|
||||
type
|
||||
NodeA = ref object
|
||||
s: char
|
||||
a: array[3, NodeA]
|
||||
|
||||
proc m: NodeA =
|
||||
result = NodeA(s: 'a')
|
||||
result.a[0] = result
|
||||
result.a[1] = result
|
||||
result.a[2] = result
|
||||
|
||||
proc mainA =
|
||||
for i in 0..10:
|
||||
discard m()
|
||||
|
||||
let mem = getOccupiedMem()
|
||||
main(90)
|
||||
mainA()
|
||||
GC_fullCollect()
|
||||
|
||||
echo "MEM ", getOccupiedMem() - mem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue