std: Be resilient to failure in pthread_getattr_np
This can fail on linux for various reasons, such as the /proc filesystem not being mounted. There are already many cases where we can't set up stack guards, so just don't worry about this case and communicate that no guard was enabled. I've confirmed that this allows the compiler to run in a chroot without /proc mounted. Closes #22642
This commit is contained in:
@@ -86,7 +86,8 @@ impl Thread {
|
||||
}
|
||||
|
||||
pub mod guard {
|
||||
pub unsafe fn main() -> usize { 0 }
|
||||
pub unsafe fn current() -> usize { 0 }
|
||||
pub unsafe fn init() {}
|
||||
use prelude::v1::*;
|
||||
|
||||
pub unsafe fn current() -> Option<usize> { None }
|
||||
pub unsafe fn init() -> Option<usize> { None }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user