Skip to content

Commit 393e9fa

Browse files
committedJan 15, 2025·
internal/core/adt: do not free vertex
We haven't implemented memory management yet so do not try to do this. In some cases, it leads to a nil node, leading to a crash. The fact that some of the counters change is already quite suspicious. Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: Ie2b10b3c428d32e6c4156317f8da0225fcf540d1 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207171 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent ed235a8 commit 393e9fa

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed
 

‎cue/testdata/benchmarks/disjunctelim.txtar

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ issue3610: {
4040
}
4141

4242
-- out/evalalpha/stats --
43-
Leaks: 572
44-
Freed: 230
45-
Reused: 230
46-
Allocs: 572
43+
Leaks: 612
44+
Freed: 190
45+
Reused: 190
46+
Allocs: 612
4747
Retain: 0
4848

4949
Unifications: 22
@@ -58,10 +58,10 @@ diff old new
5858
-Freed: 367
5959
-Reused: 356
6060
-Allocs: 11
61-
+Leaks: 572
62-
+Freed: 230
63-
+Reused: 230
64-
+Allocs: 572
61+
+Leaks: 612
62+
+Freed: 190
63+
+Reused: 190
64+
+Allocs: 612
6565
Retain: 0
6666

6767
-Unifications: 133

‎cue/testdata/benchmarks/disjunction.txtar

+8-8
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ x: a0: {}
146146
}
147147
}
148148
-- out/evalalpha/stats --
149-
Leaks: 158
150-
Freed: 4
151-
Reused: 4
152-
Allocs: 158
149+
Leaks: 162
150+
Freed: 0
151+
Reused: 0
152+
Allocs: 162
153153
Retain: 0
154154

155155
Unifications: 6
@@ -164,10 +164,10 @@ diff old new
164164
-Freed: 82
165165
-Reused: 74
166166
-Allocs: 8
167-
+Leaks: 158
168-
+Freed: 4
169-
+Reused: 4
170-
+Allocs: 158
167+
+Leaks: 162
168+
+Freed: 0
169+
+Reused: 0
170+
+Allocs: 162
171171
Retain: 0
172172

173173
-Unifications: 4

‎cue/testdata/benchmarks/issue1684.txtar

+8-8
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ nestedClosed: passing: {
6262
D: {id: {}} | {[string]: D}
6363
}
6464
-- out/evalalpha/stats --
65-
Leaks: 2135
66-
Freed: 658
67-
Reused: 658
68-
Allocs: 2135
65+
Leaks: 2140
66+
Freed: 653
67+
Reused: 653
68+
Allocs: 2140
6969
Retain: 0
7070

7171
Unifications: 475
@@ -143,10 +143,10 @@ diff old new
143143
-Freed: 1064333
144144
-Reused: 1064282
145145
-Allocs: 51
146-
+Leaks: 2135
147-
+Freed: 658
148-
+Reused: 658
149-
+Allocs: 2135
146+
+Leaks: 2140
147+
+Freed: 653
148+
+Reused: 653
149+
+Allocs: 2140
150150
Retain: 0
151151

152152
-Unifications: 792123

‎cue/testdata/benchmarks/listdedup.txtar

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ C: #steps: #Script & {mount: [B]}
3333

3434
#ref: {a: 1} | {b: 2}
3535
-- out/evalalpha/stats --
36-
Leaks: 158
37-
Freed: 10
38-
Reused: 10
39-
Allocs: 158
36+
Leaks: 168
37+
Freed: 0
38+
Reused: 0
39+
Allocs: 168
4040
Retain: 0
4141

4242
Unifications: 56
@@ -545,10 +545,10 @@ diff old new
545545
-Reused: 24051
546546
-Allocs: 45
547547
-Retain: 1
548-
+Leaks: 158
549-
+Freed: 10
550-
+Reused: 10
551-
+Allocs: 158
548+
+Leaks: 168
549+
+Freed: 0
550+
+Reused: 0
551+
+Allocs: 168
552552
+Retain: 0
553553

554554
-Unifications: 18724

‎cue/testdata/eval/conjuncts.txtar

+8-8
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ issue2355: {
6969
}
7070

7171
-- out/evalalpha/stats --
72-
Leaks: 216
73-
Freed: 30
74-
Reused: 30
75-
Allocs: 216
72+
Leaks: 246
73+
Freed: 0
74+
Reused: 0
75+
Allocs: 246
7676
Retain: 0
7777

7878
Unifications: 43
@@ -163,10 +163,10 @@ diff old new
163163
-Reused: 59
164164
-Allocs: 18
165165
-Retain: 22
166-
+Leaks: 216
167-
+Freed: 30
168-
+Reused: 30
169-
+Allocs: 216
166+
+Leaks: 246
167+
+Freed: 0
168+
+Reused: 0
169+
+Allocs: 246
170170
+Retain: 0
171171

172172
-Unifications: 45

‎cue/testdata/eval/notify.txtar

+8-8
Original file line numberDiff line numberDiff line change
@@ -1596,10 +1596,10 @@ Result:
15961596
}
15971597
}
15981598
-- out/evalalpha/stats --
1599-
Leaks: 2249
1600-
Freed: 266
1601-
Reused: 265
1602-
Allocs: 2250
1599+
Leaks: 2262
1600+
Freed: 253
1601+
Reused: 252
1602+
Allocs: 2263
16031603
Retain: 0
16041604

16051605
Unifications: 760
@@ -1615,10 +1615,10 @@ diff old new
16151615
-Reused: 85
16161616
-Allocs: 46
16171617
-Retain: 5
1618-
+Leaks: 2249
1619-
+Freed: 266
1620-
+Reused: 265
1621-
+Allocs: 2250
1618+
+Leaks: 2262
1619+
+Freed: 253
1620+
+Reused: 252
1621+
+Allocs: 2263
16221622
+Retain: 0
16231623

16241624
-Unifications: 48

‎internal/core/adt/disjunct2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ outer:
634634
if x.defaultMode == isDefault {
635635
xn.defaultMode = isDefault
636636
}
637-
x.free()
637+
// TODO: x.free()
638638
return a
639639
}
640640

0 commit comments

Comments
 (0)
Please sign in to comment.