Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of std::process::abort is potentially unsound #12

Closed
nagisa opened this issue Nov 23, 2020 · 3 comments
Closed

Use of std::process::abort is potentially unsound #12

nagisa opened this issue Nov 23, 2020 · 3 comments

Comments

@nagisa
Copy link

nagisa commented Nov 23, 2020

std::process::abort might fail to terminate the program if the signal is caught and the handler longjmps away. While longjmp is a poorly supported feature in Rust, it is nevertheless something that is valid to do.

@Sgeo
Copy link
Owner

Sgeo commented Nov 23, 2020

Would switching back to exit be sufficient to resolve this? If I'm reading manuals properly, attempting to longjmp from a place that can interfere with exit is undefined.

@Sgeo
Copy link
Owner

Sgeo commented Nov 23, 2020

Discussion in the Rust discord makes me believe longjmp is currently considered to be usually unsound in Rust.

@Sgeo Sgeo closed this as completed Nov 23, 2020
@Sgeo
Copy link
Owner

Sgeo commented Nov 23, 2020

Might be worth keeping an eye on rust-lang/rfcs#2625

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants