Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Conversation

@aleksmelnikov
Copy link

@aleksmelnikov aleksmelnikov commented Jul 7, 2019

Fix for #826.

@aleksmelnikov
Copy link
Author

Errors from Travis-CI:

$ rustc --version
rustc 1.35.0 (3c235d560 2019-05-20)
...
   Compiling cranelift-simplejit v0.33.0 (/home/travis/build/CraneStation/cranelift/cranelift-simplejit)
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
  --> cranelift-simplejit/src/memory.rs:34:46
   |
34 |             let mut ptr: *mut libc::c_void = mem::MaybeUninit::uninit().assume_init();
   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^
   Compiling cranelift-filetests v0.33.0 (/home/travis/build/CraneStation/cranelift/cranelift-filetests)
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
  --> cranelift-simplejit/src/memory.rs:34:73
   |
34 |             let mut ptr: *mut libc::c_void = mem::MaybeUninit::uninit().assume_init();
   |                                                                         ^^^^^^^^^^^
error: aborting due to 2 previous errors
...

@aleksmelnikov
Copy link
Author

aleksmelnikov commented Jul 7, 2019

There's a recommendation to replace 0 as *const/mut T with ptr::null/null_mut():
rust-lang/rust#21444

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 7, 2019

Forgot about that :)

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can you squash your three commits together, please? Thanks!

Fix for `https://github.com/CraneStation/cranelift/issues/826`.
This fix will require 1.36 minimal version for all Cranelift. Right?

Update cranelift-simplejit/src/memory.rs

Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>

Update memory.rs
@aleksmelnikov
Copy link
Author

@bnjbvr , 3 commits have been squashed.

@bnjbvr bnjbvr self-requested a review July 8, 2019 13:21
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bnjbvr bnjbvr merged commit 4125d47 into bytecodealliance:master Jul 8, 2019
@aleksmelnikov
Copy link
Author

@bjorn3 , @bnjbvr , Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants