unix: Unsafe-wrap stack_overflow::cleanup
Editorialize on the wisdom of this as we do.
This commit is contained in:
parent
357ba1f8ec
commit
fa628ceaff
1 changed files with 6 additions and 1 deletions
|
@ -155,8 +155,13 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
/// # Safety
|
||||
/// Must be called only once
|
||||
#[forbid(unsafe_op_in_unsafe_fn)]
|
||||
pub unsafe fn cleanup() {
|
||||
drop_handler(MAIN_ALTSTACK.load(Ordering::Relaxed));
|
||||
// FIXME: I probably cause more bugs than I'm worth!
|
||||
// see https://github.com/rust-lang/rust/issues/111272
|
||||
unsafe { drop_handler(MAIN_ALTSTACK.load(Ordering::Relaxed)) };
|
||||
}
|
||||
|
||||
unsafe fn get_stack() -> libc::stack_t {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue