1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // error-pattern:explicit failure
13 // This time we're testing that the stack limits are restored
14 // correctly after calling into the C stack and unwinding.
15 // See the hack in upcall_call_shim_on_c_stack where it messes
16 // with the stack limit.
27 pub fn rust_get_argc() -> libc::c_int;
31 fn getbig_call_c_and_fail(i: int) {
33 getbig_call_c_and_fail(i - 1);
36 rustrt::rust_get_argc();
42 struct and_then_get_big_again {
46 impl Drop for and_then_get_big_again {
57 fn and_then_get_big_again(x:int) -> and_then_get_big_again {
58 and_then_get_big_again {
65 let r = and_then_get_big_again(4);
66 getbig_call_c_and_fail(10000);