From 83ac32e8aaf10ff2257fea7c7d21c9602c1bb29e Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 1 Sep 2011 11:44:59 -0700 Subject: [PATCH] rt: Zero out dynamic allocas for now --- src/rt/rust_obstack.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rt/rust_obstack.cpp b/src/rt/rust_obstack.cpp index a3a992c2c57..4f30eb78f80 100644 --- a/src/rt/rust_obstack.cpp +++ b/src/rt/rust_obstack.cpp @@ -59,6 +59,7 @@ rust_obstack_chunk::alloc(size_t len, type_desc *tydesc) { rust_obstack_alloc *a = new(data + alen) rust_obstack_alloc(len, tydesc); alen += sizeof(*a) + len; + memset(a->data, '\0', len); // FIXME: For GC. return &a->data; }