diff --git a/src/rt/rust_env.cpp b/src/rt/rust_env.cpp index cade5f1ed2c17..041b4efac52a2 100644 --- a/src/rt/rust_env.cpp +++ b/src/rt/rust_env.cpp @@ -97,7 +97,7 @@ get_max_stk_size() { return strtol(maxsz, NULL, 0); } else { - return 1024*1024*8; + return 1024*1024*1024; } } diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 7e146cce68e7c..e6293aa5c1de0 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -530,11 +530,11 @@ rust_task::new_stack(size_t requested_sz) { // arbitrarily selected as 2x the maximum stack size. if (!unwinding && used_stack > max_stack) { LOG_ERR(this, task, "task %" PRIxPTR " ran out of stack", this); - fail(); + abort(); } else if (unwinding && used_stack > max_stack * 2) { LOG_ERR(this, task, "task %" PRIxPTR " ran out of stack during unwinding", this); - fail(); + abort(); } size_t sz = rust_stk_sz + RED_ZONE_SIZE; diff --git a/src/test/run-fail/issue-2144.rs b/src/test/run-fail/issue-2144.rs deleted file mode 100644 index 56b7acc7f0f18..0000000000000 --- a/src/test/run-fail/issue-2144.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// error-pattern:ran out of stack - -// Don't leak when the landing pads need to request more stack -// than is allowed during normal execution - -fn useBlock(f: ~fn() -> uint) { useBlock(|| 22u ) } -fn main() { - useBlock(|| 22u ); -} diff --git a/src/test/run-fail/out-of-stack-managed-box.rs b/src/test/run-fail/out-of-stack-managed-box.rs deleted file mode 100644 index 9dcdaacb3c1a4..0000000000000 --- a/src/test/run-fail/out-of-stack-managed-box.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// xfail-test iloops with optimizations on - -// NB: Not sure why this works. I expect the box argument to leak when -// we run out of stack. Maybe the box annihilator works it out? - -// error-pattern:ran out of stack -fn main() { - eat(@0); -} - -fn eat( - +a: @int -) { - eat(a) -} diff --git a/src/test/run-fail/out-of-stack-owned-box.rs b/src/test/run-fail/out-of-stack-owned-box.rs deleted file mode 100644 index d4bc70f43ef6e..0000000000000 --- a/src/test/run-fail/out-of-stack-owned-box.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// xfail-test -// error-pattern:ran out of stack -fn main() { - eat(~0); -} - -fn eat( - +a: ~int -) { - eat(a) -} diff --git a/src/test/run-fail/too-much-recursion.rs b/src/test/run-fail/too-much-recursion.rs deleted file mode 100644 index 04514b13455fb..0000000000000 --- a/src/test/run-fail/too-much-recursion.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// error-pattern:ran out of stack - -// Test that the task fails after hiting the recursion limit - -fn main() { - debug!(~"don't optimize me out"); - main(); -}