about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-07-19 23:33:37 -0700
committerBrian Anderson <banderson@mozilla.com>2011-07-20 10:22:18 -0700
commita467e8e4e6981208b0de4e5fb44885f12c390412 (patch)
tree70b5bf413a38f3c79d1528e5aba9f38c82b4c339 /src/rt/rust_builtin.cpp
parent3fb33008ce5bdd1e369b471bc20b6fe28c0f550e (diff)
downloadrust-a467e8e4e6981208b0de4e5fb44885f12c390412.tar.gz
rust-a467e8e4e6981208b0de4e5fb44885f12c390412.zip
Add a huge hack to allow the test runner to continue if a single task leaks
This is just until unwinding works. Adds a flag to the runtime to turn
the memory leak checks on task destruction into warnings instead of fatal
errors. I am so sorry.

Issue #428
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index e434138f102..f35a7a2e2cf 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -459,6 +459,13 @@ debug_opaque(rust_task *task, type_desc *t, uint8_t *front)
     }
 }
 
+extern "C" CDECL void
+hack_allow_leaks(rust_task *task)
+{
+    LOG(task, stdlib, "hack_allow_leaks");
+    task->local_region.hack_allow_leaks();
+}
+
 struct rust_box {
     RUST_REFCOUNTED(rust_box)