From ab76305cb98c0fd3a128003874c854686d0ed4d9 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 20 Sep 2011 19:14:31 -0700 Subject: [PATCH] rt: Skip over the reference count properly before walking the contents of the box when determining internal reference counts --- src/rt/rust_cc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rt/rust_cc.cpp b/src/rt/rust_cc.cpp index 3d5464a2c39..6aba220c0b9 100644 --- a/src/rt/rust_cc.cpp +++ b/src/rt/rust_cc.cpp @@ -163,6 +163,8 @@ irc::compute_ircs(rust_task *task, irc_map &ircs) { end(task->local_allocs.end()); while (begin != end) { uint8_t *p = reinterpret_cast(begin->first); + p += sizeof(uintptr_t); // Skip over the reference count. + type_desc *tydesc = begin->second; DPRINT("determining internal ref counts: %p, tydesc=%p\n", p, tydesc);