about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcore/rt.rs6
-rw-r--r--src/rustc/middle/trans/base.rs2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libcore/rt.rs b/src/libcore/rt.rs
index 357c3fba744..4ec6accf634 100644
--- a/src/libcore/rt.rs
+++ b/src/libcore/rt.rs
@@ -39,6 +39,12 @@ fn rt_fail(expr: *c_char, file: *c_char, line: size_t) {
     rustrt::rust_upcall_fail(expr, file, line);
 }
 
+#[rt(fail_)]
+fn rt_fail_(expr: *c_char, file: *c_char, line: size_t) {
+    cleanup_stack_for_failure();
+    rustrt::rust_upcall_fail(expr, file, line);
+}
+
 #[rt(exchange_malloc)]
 fn rt_exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
     return rustrt::rust_upcall_exchange_malloc(td, size);
diff --git a/src/rustc/middle/trans/base.rs b/src/rustc/middle/trans/base.rs
index 98b942ace2b..638ccca3dbe 100644
--- a/src/rustc/middle/trans/base.rs
+++ b/src/rustc/middle/trans/base.rs
@@ -2403,7 +2403,7 @@ fn gather_rtcalls(ccx: @crate_ctxt, crate: @ast::crate) {
     // in some obscure place in LLVM if the user provides the wrong signature
     // for an rtcall.
     let expected_rtcalls =
-        ~[~"exchange_free", ~"exchange_malloc", ~"fail", ~"free", ~"malloc"];
+        ~[~"exchange_free", ~"exchange_malloc", ~"fail_", ~"free", ~"malloc"];
     for vec::each(expected_rtcalls) |name| {
         if !ccx.rtcalls.contains_key(name) {
             fail fmt!("no definition for runtime call %s", name);