aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-15 18:59:31 -0700
committerGraydon Hoare <[email protected]>2010-07-15 18:59:31 -0700
commit5d8430afa711bd694ce035c72e98f57ad49240a7 (patch)
tree9a6c14b8b4dd300060c3dc06b534a76bc10f8402 /src/rt/rust_upcall.cpp
parentXFAIL the new destructor tests; collided with new typechecker; add test for i... (diff)
downloadrust-5d8430afa711bd694ce035c72e98f57ad49240a7.tar.xz
rust-5d8430afa711bd694ce035c72e98f57ad49240a7.zip
Fix a couple fails with wrong arg count (new arg from last gc change); expand vec_grow logging a bit.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 602264b5..99df91a6 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();