Skip to content

Commit 83ac32e

Browse files
committed
rt: Zero out dynamic allocas for now
1 parent a6c1496 commit 83ac32e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rt/rust_obstack.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ rust_obstack_chunk::alloc(size_t len, type_desc *tydesc) {
5959

6060
rust_obstack_alloc *a = new(data + alen) rust_obstack_alloc(len, tydesc);
6161
alen += sizeof(*a) + len;
62+
memset(a->data, '\0', len); // FIXME: For GC.
6263
return &a->data;
6364
}
6465

0 commit comments

Comments
 (0)