Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/gc/impl/proto/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ class ProtoGC : GC
return;
}
}
assert(false);
}

@property RootIterator rootIter() return @nogc
Expand Down Expand Up @@ -211,7 +210,6 @@ class ProtoGC : GC
return;
}
}
assert(false);
}

@property RangeIterator rangeIter() return @nogc
Expand Down
2 changes: 1 addition & 1 deletion test/init_fini/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../common.mak

TESTS:=thread_join runtime_args
TESTS:=thread_join runtime_args test18996

.PHONY: all clean
all: $(addprefix $(ROOT)/,$(addsuffix .done,$(TESTS)))
Expand Down
13 changes: 13 additions & 0 deletions test/init_fini/src/test18996.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Issue https://issues.dlang.org/show_bug.cgi?id=18996
// Array!string calls removeRange without first adding the range, but never
// initializes the GC. The behavior of the default GC is to ignore removing
// ranges when the range wasn't added. The ProtoGC originally would crash when
// this happened.

import core.memory;

void main()
{
GC.removeRange(null);
GC.removeRoot(null);
}