aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index 9cc2fe41..d0215edc 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -53,7 +53,9 @@ rust_srv::realloc(void *p, size_t bytes)
}
void * val = ::realloc(p, bytes);
#ifdef TRACK_ALLOCATIONS
- if (allocation_list.replace(p, val) == NULL) {
+ if (allocation_list.replace(p, val) == false) {
+ printf("realloc: ptr 0x%" PRIxPTR " is not in allocation_list\n",
+ (uintptr_t) p);
fatal("not in allocation_list", __FILE__, __LINE__);
}
#endif
@@ -64,8 +66,8 @@ void
rust_srv::free(void *p)
{
#ifdef TRACK_ALLOCATIONS
- if (allocation_list.replace(p, NULL) == NULL) {
- printf("ptr 0x%" PRIxPTR " is not in allocation_list\n",
+ if (allocation_list.replace(p, NULL) == false) {
+ printf("free: ptr 0x%" PRIxPTR " is not in allocation_list\n",
(uintptr_t) p);
fatal("not in allocation_list", __FILE__, __LINE__);
}
@@ -182,7 +184,7 @@ rust_start(uintptr_t main_fn, rust_crate const *crate, int argc, char **argv)
int ret;
{
rust_srv srv;
- rust_dom dom(&srv, crate);
+ rust_dom dom(&srv, crate, "main");
command_line_args args(dom, argc, argv);
dom.log(rust_log::DOM, "startup: %d args", args.argc);