This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,6 @@ class ProtoGC : GC
177
177
return ;
178
178
}
179
179
}
180
- assert (false );
181
180
}
182
181
183
182
@property RootIterator rootIter() return @nogc
@@ -211,7 +210,6 @@ class ProtoGC : GC
211
210
return ;
212
211
}
213
212
}
214
- assert (false );
215
213
}
216
214
217
215
@property RangeIterator rangeIter() return @nogc
Original file line number Diff line number Diff line change 1
1
include ../common.mak
2
2
3
- TESTS: =thread_join runtime_args
3
+ TESTS: =thread_join runtime_args test18996
4
4
5
5
.PHONY : all clean
6
6
all : $(addprefix $(ROOT ) /,$(addsuffix .done,$(TESTS ) ) )
Original file line number Diff line number Diff line change
1
+ // Issue https://issues.dlang.org/show_bug.cgi?id=18996
2
+ // Array!string calls removeRange without first adding the range, but never
3
+ // initializes the GC. The behavior of the default GC is to ignore removing
4
+ // ranges when the range wasn't added. The ProtoGC originally would crash when
5
+ // this happened.
6
+
7
+ import core.memory ;
8
+
9
+ void main ()
10
+ {
11
+ GC .removeRange(null );
12
+ GC .removeRoot(null );
13
+ }
You can’t perform that action at this time.
0 commit comments