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 on rust 1.44.0 #313

Closed
rjmac opened this issue Jun 5, 2020 · 5 comments
Closed

Panic on rust 1.44.0 #313

rjmac opened this issue Jun 5, 2020 · 5 comments

Comments

@rjmac
Copy link

rjmac commented Jun 5, 2020

The release of rust-lang/rust#66059 in 1.44.0 makes things panic that didn't before, and rustler is affected by it. The changes in #239 fix it, and that cherry-picks (almost) cleanly on top of 0.21.0. Perhaps it would be a good idea to release a version 0.21.1 with that change, if 0.22 isn't ready for release yet?

@Lakret
Copy link

Lakret commented Jun 5, 2020

For those also affected by this issue, the temporary fix is (for macOS):

rustup install 1.43.0
rustup default 1.43.0-x86_64-apple-darwin

For me the error looked like this:

thread '<unnamed>' panicked at 'attempted to leave type `rustler_sys::ErlNifResourceFlags` uninitialized, which is invalid', /Users/.../.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/mem/mod.rs:661:5

@filmor
Copy link
Member

filmor commented Jun 5, 2020

Just to be clear, this panics when compiling, not in the NIF, is that right? I think we can reasonably backport that patch and do an intermediary patch release.

@rjmac
Copy link
Author

rjmac commented Jun 5, 2020

It panics during mix compile, but rustc is done and mix is doing something that's actually trying to load the library at that point. It's a runtime check for undefined behavior that rustc is inserting.

@filmor
Copy link
Member

filmor commented Jun 6, 2020

@scrogson @hansihe I created a branch that backports the patch to 0.21 and bumps the version to 0.21.1 at https://github.com/rusterlium/rustler/tree/rustler-0.21-backport, you only need to check it out and run

pushd rustler_mix
mix hex.publish
popd
pushd rustler
cargo publish
popd
pushd rustler_codegen
cargo publish
popd

I suggest you do that as soon as possible, this can result in some very nasty surprises for people in production.

@filmor filmor pinned this issue Jun 6, 2020
@scrogson
Copy link
Member

scrogson commented Jun 6, 2020

v0.21.1 published. @filmor thanks for taking care of the changes 👍

@filmor filmor closed this as completed Jun 8, 2020
kristoff3r added a commit to kristoff3r/blake3 that referenced this issue Aug 18, 2020
This fixes rusterlium/rustler#313, which makes
rustler panic on rust 1.44 and above.
@filmor filmor unpinned this issue Sep 24, 2023
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

4 participants