Skip to content

Commit f300c2a

Browse files
authored
Fix box infinite recur (#1319)
1 parent 45cec8d commit f300c2a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Tracing.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,8 @@ Base.@nospecializeinfer function make_tracer(
17841784
seen[prev] = prev
17851785
return prev
17861786
end
1787+
res = Core.Box(prev2)
1788+
seen[prev] = res
17871789
tr = make_tracer(
17881790
seen,
17891791
prev2,
@@ -1796,8 +1798,7 @@ Base.@nospecializeinfer function make_tracer(
17961798
seen[prev] = prev
17971799
return prev
17981800
end
1799-
res = Core.Box(tr)
1800-
seen[prev] = res
1801+
res.contents = prev2
18011802
return res
18021803
end
18031804

0 commit comments

Comments
 (0)