From 5d8430afa711bd694ce035c72e98f57ad49240a7 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 15 Jul 2010 18:59:31 -0700 Subject: [PATCH] Fix a couple fails with wrong arg count (new arg from last gc change); expand vec_grow logging a bit. --- src/rt/rust_upcall.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 602264b5498..99df91a6dc0 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -418,7 +418,9 @@ upcall_vec_grow(rust_task *task, rust_vec *v, size_t n_bytes, uintptr_t is_gc) LOG_UPCALL_ENTRY(task); rust_dom *dom = task->dom; dom->log(rust_log::UPCALL|rust_log::MEM, - "upcall vec_grow(%" PRIxPTR ", %" PRIdPTR ")", v, n_bytes); + "upcall vec_grow(%" PRIxPTR ", %" PRIdPTR + "), alloc=%" PRIdPTR ", fill=%" PRIdPTR, + v, n_bytes, v->alloc, v->fill); size_t alloc = next_power_of_two(sizeof(rust_vec) + v->fill + n_bytes); if (v->refcnt == 1) { @@ -432,7 +434,7 @@ upcall_vec_grow(rust_task *task, rust_vec *v, size_t n_bytes, uintptr_t is_gc) dom->log(rust_log::UPCALL|rust_log::MEM, "realloc path"); v = (rust_vec*)dom->realloc(v, alloc); if (!v) { - task->fail(3); + task->fail(4); return NULL; } v->alloc = alloc; @@ -442,7 +444,7 @@ upcall_vec_grow(rust_task *task, rust_vec *v, size_t n_bytes, uintptr_t is_gc) dom->log(rust_log::UPCALL|rust_log::MEM, "new vec path"); void *mem = dom->malloc(alloc); if (!mem) { - task->fail(3); + task->fail(4); return NULL; } v->deref();