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

Unexpected panic when going from debug to release build #59919

Closed
ckaran opened this issue Apr 12, 2019 · 3 comments
Closed

Unexpected panic when going from debug to release build #59919

ckaran opened this issue Apr 12, 2019 · 3 comments

Comments

@ckaran
Copy link

ckaran commented Apr 12, 2019

I'm using ctor to fake the creation of constants when using noisy_float. I've discovered that my code runs correctly in debug builds, but the same code panics in release builds. I've created a minimal repository here that illustrates the problem.

@jonas-schievink
Copy link
Contributor

Reproduces on 1.33.0 as well. Seems like this code in ctor might be missing a #[used]?

https://github.com/mmastrac/rust-ctor/blob/1fb201c60600ef3e7d3604132dc0d9d390f06372/ctor/src/lib.rs#L203-L206

@jonas-schievink
Copy link
Contributor

Ah, it's already reported there: mmastrac/rust-ctor#15

@jonas-schievink
Copy link
Contributor

Seems like this code in ctor might be missing a #[used]?

Yup, that fixes it, closing in favor of the upstream issue.

mmastrac added a commit to mmastrac/rust-ctor that referenced this issue Apr 12, 2019
suptalentdev added a commit to suptalentdev/rust-ctor that referenced this issue Jan 30, 2022
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