diff options
| author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-03-20 21:15:21 +0900 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-03-20 21:15:21 +0900 |
| commit | 8c8a72f8224b9cbf283cd120d87397c032ed62f1 (patch) | |
| tree | f4a6456a5eb138e46feefcb01a1359cde9961da5 /src | |
| parent | a185b56b7caca17c7aa9d6f702fe1b2209c82e4e (diff) | |
| download | rust-8c8a72f8224b9cbf283cd120d87397c032ed62f1.tar.gz rust-8c8a72f8224b9cbf283cd120d87397c032ed62f1.zip | |
Reinit the stack guard on unexpected failure
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_driver/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index e39a2c2f5dc..e56c9928dcc 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -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 |
