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

List functions or lines that can panic #26

Open
alexchandel opened this issue Feb 28, 2020 · 1 comment
Open

List functions or lines that can panic #26

alexchandel opened this issue Feb 28, 2020 · 1 comment

Comments

@alexchandel
Copy link

(Imported from geiger-rs/cargo-geiger#50 for want of a call-stack graph).

Panics are very overused in libraries, and can unexpectedly crash unwary users and poison their mutexes. We need something to warn unsuspecting consumers which of their functions is most "explosive" / invokes the most panics, and which libraries are the cause. Without this, it's impossible for large codebases to be certain their threads won't panic and explode, nor even for small codebases that use complex libraries with many dependencies to be certain how explosive their calls truly are.

Ideally, panics provably unreachable by the compiler should not be reported. And a flag to suppress slicing panics is worthy of consideration.

@laudiacay
Copy link
Contributor

Some useful one-liners for this in the comments of this: https://www.reddit.com/r/rust/comments/g9mw57/oneliner_to_correctly_list_all_uses_ofunsafe_in/

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