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

Rust sometimes emits calls to _Unwind_Resume on opt-level = 0 with panic = abort #53301

Open
CryZe opened this issue Aug 13, 2018 · 5 comments
Open
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@CryZe
Copy link
Contributor

CryZe commented Aug 13, 2018

I don't think this is intentional. I'm working on a no_std project and for the first time tried to compile with the debug profile and there seem to be undefined references to _Unwind_Resume even though panic = "abort" is specified. opt-level = 1 seems to get rid of those calls.

@jonas-schievink jonas-schievink added A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 6, 2019
@glandium
Copy link
Contributor

As of #67502, this happens at any opt-level because of libstd itself containing these symbols.

@glandium
Copy link
Contributor

(and libbacktrace)

@Enselic
Copy link
Member

Enselic commented Dec 16, 2023

Triage: Please provide a minimal way to reproduce the problem (if this still is a problem). Thanks!

@Enselic Enselic added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Dec 16, 2023
@jackh726
Copy link
Member

Closing since there is no reproduction.

@bjorn3
Copy link
Member

bjorn3 commented Dec 25, 2023

I'm fairly certain this is still an issue as the standard library is still compiled with panic=unwind. The default -Clink-dead-code=no may mask this in most cases, but that is not the solution.

@jackh726 jackh726 reopened this Dec 25, 2023
@jackh726 jackh726 added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants