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

Commit da6ab01

Browse files
MartinNowakthewilsonator
authored andcommitted
zero class storage when initializer is null
- all zero initializers are not stored in the typeinfo although classes currently always come with a non-zero vtable
1 parent 4246408 commit da6ab01

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)