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

panic = "abort" on release #183

Closed
jon-chuang opened this issue Jan 20, 2021 · 1 comment · Fixed by #184
Closed

panic = "abort" on release #183

jon-chuang opened this issue Jan 20, 2021 · 1 comment · Fixed by #184

Comments

@jon-chuang
Copy link
Contributor

This can reduce binary size and improve instr cache performance. So maybe we should test this.

@daira
Copy link
Contributor

daira commented Jan 20, 2021

It's also completely necessary for security and correctness in mixed-language projects, because panics across an FFI boundary are undefined behaviour. By their nature it's impossible to prevent panics, and the only other alternative is to add a bunch of verbose and error-prone boilerplate to all code that crosses an FFI boundary — including in libraries you don't want to have to change. See also zcash/librustzcash#78 and rust-lang/rust#52652, in particular my comment here and the subsequent discussion.

Note that panic = "abort" only takes effect for a top-level crate, not dependencies.

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

Successfully merging a pull request may close this issue.

2 participants