Reinit the stack guard on unexpected failure
This commit is contained in:
parent
a185b56b7c
commit
8c8a72f822
1 changed files with 3 additions and 3 deletions
|
@ -1480,9 +1480,9 @@ pub fn in_rustc_thread<F, R>(f: F) -> Result<R, Box<Any + Send>>
|
|||
rlim.rlim_cur = STACK_SIZE as libc::rlim_t;
|
||||
if libc::setrlimit(libc::RLIMIT_STACK, &mut rlim) != 0 {
|
||||
let err = io::Error::last_os_error();
|
||||
// We have already deinited the stack. Further corruption is
|
||||
// not allowed.
|
||||
panic!("in_rustc_thread: error calling setrlimit: {}", err);
|
||||
error!("in_rustc_thread: error calling setrlimit: {}", err);
|
||||
std::rt::update_stack_guard();
|
||||
true
|
||||
} else {
|
||||
std::rt::update_stack_guard();
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue