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
libunwind is compiled even with panic_immediate_abort #6358
Comments
What are you asking us to do? The |
And I'm asking for ability to disable unwinding |
What, concretely, do you want us to do to disable unwinding? I could be mistaken, but to my knowledge, there's nothing that Tokio needs to do and it should just work. |
It is probably related to catching panics and something like this. I know that these is a runtime ability to disable panic silencing (which is behind a tokio_unstable feature gate), but this probably wouldn't help. There could be more places like this, but grep'ing sources gives little to no clue where to fix, only a reference to Further investigation is probably needed |
I mean, one example of how we don't have to do anything is that |
Ahh, I (probably) meant not only unwinding but backtrace generating too...
…On Mon, Feb 19, 2024, 00:27 Alice Ryhl ***@***.***> wrote:
I mean, one example of how we don't have to do anything is that
catch_unwind becomes a no-op when you set panic=abort. (It still needs
libunwind, but that's for printing the backtrace, not for unwinding.)
—
Reply to this email directly, view it on GitHub
<#6358 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKVCK4WLAQI4YLFLQY3KWRTYUJW4HAVCNFSM6AAAAABDONNM3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGQ2DSOJYGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Version and platform
Note that I use Arch Linux as a host system and musl-rust is from alpine chroot.
Description
I use agressive rust code minification for one of my projects and
panic_immediate_abort
to disable unwinding to make executable smaller. However, this crate does not provide a simple way of disabling (or rather not enabling) unwinding.The simplest example I can think of is
Let's define some environment variables so I won't have to type them in every code block
If I compile the binary as I always do, I get 67 kilobytes of output. That looks like too much for something this simple...
I expected somewhat smaller executable and dug into
cargo bloat
output. Note that I'm not stripping the binary here for cargo bloat to actually workThis is... interesting. If we look at what cargo bloat has to say for crates, we'll see
Judging by cargo bloat output,
[Unknown]
andstd
should mostly be libunwind and something related to them. I wonder now if it is possible to disable unwinding, possibly by making some features opt-in and default.The text was updated successfully, but these errors were encountered: