Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 8fa4129

Browse files
authored
Merge pull request #2091 from MartinNowak/fixup2079
zero class storage when initializer is null merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 29f495b + da6ab01 commit 8fa4129

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/thread.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,6 +2104,8 @@ extern (C) void thread_term() @nogc
21042104
_d_monitordelete_nogc(Thread.sm_main);
21052105
if (typeid(Thread).initializer.ptr)
21062106
_mainThreadStore[] = typeid(Thread).initializer[];
2107+
else
2108+
(cast(ubyte[])_mainThreadStore)[] = 0;
21072109
Thread.sm_main = null;
21082110

21092111
assert(Thread.sm_tbeg && Thread.sm_tlen == 1);

0 commit comments

Comments
 (0)