Skip to content

Remove uses of mem::uninitialized from std::sys::cloudabi - #62738

Merged
bors merged 4 commits into
rust-lang:masterfrom
nathanwhit:fix_mem_uninit_cloudabi
Jul 24, 2019
Merged

Remove uses of mem::uninitialized from std::sys::cloudabi#62738
bors merged 4 commits into
rust-lang:masterfrom
nathanwhit:fix_mem_uninit_cloudabi

Conversation

@nathanwhit

Copy link
Copy Markdown
Contributor

Addresses #62397 for std::sys::cloudabi, excluding the tests within cloudabi, which will be a separate PR

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 17, 2019
Comment threadsrc/libstd/sys/cloudabi/condvar.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/condvar.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/mutex.rs Outdated
@bors

bors commented Jul 22, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #62873) made this pull request unmergeable. Please resolve the merge conflicts.

@nathanwhit
nathanwhitforce-pushed the fix_mem_uninit_cloudabi branch from 32c4021 to 7a23a6dCompareJuly 22, 2019 21:35
Usages still appear in cloudabi tests and in the reentrant mutex implementation
@nathanwhit
nathanwhitforce-pushed the fix_mem_uninit_cloudabi branch from 257c0e9 to 66e37daCompareJuly 23, 2019 00:42
Comment threadsrc/libstd/sys/cloudabi/mutex.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/mutex.rs Outdated
@RalfJung

Copy link
Copy Markdown
Member

@EdSchouten any advise for how to compile-test CloudAbi code?

@nathanwhit

nathanwhit commented Jul 23, 2019

Copy link
Copy Markdown
ContributorAuthor

@EdSchouten any advise for how to compile-test CloudAbi code?

I figured out how to compile-test it after all. The basic info is here. The short version is to download and compile the CloudAbi toolchain, then compile the CloudAbi C/C++ standard libs, then add the x86_64-unknown-cloudabi target to your config file.

Remove uses of mem::uninitialized, which is now deprecated
@nathanwhit
nathanwhitforce-pushed the fix_mem_uninit_cloudabi branch from 66e37da to 82dd54bCompareJuly 23, 2019 14:15
@rust-highfive

Copy link
Copy Markdown
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-23T14:21:26.9695381Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-23T14:21:26.9884100Z ##[command]git config gc.auto 0
2019-07-23T14:21:27.0199050Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-23T14:21:27.0250706Z ##[command]git config --get-all http.proxy
2019-07-23T14:21:27.0388086Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62738/merge:refs/remotes/pull/62738/merge
---
2019-07-23T14:22:01.7970652Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-23T14:22:01.7970702Z 2019-07-23T14:22:01.7970917Z git checkout -b <new-branch-name>
2019-07-23T14:22:01.7971139Z 2019-07-23T14:22:01.7971188Z HEAD is now at 79cf6b3f9 Merge e175c874b3d257be60183478512b121891df9225 into 3ebca72a11869f946b31f900faffb75c2bb2473a
2019-07-23T14:22:01.8110506Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-23T14:22:01.8113404Z ==============================================================================
2019-07-23T14:22:01.8113460Z Task : Bash
2019-07-23T14:22:01.8113505Z Description : Run a Bash script on macOS, Linux, or Windows
---
2019-07-23T14:28:17.4353980Z Compiling serde_json v1.0.40
2019-07-23T14:28:21.9234004Z Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-07-23T14:28:30.7869312Z Finished release [optimized] target(s) in 1m 32s
2019-07-23T14:28:30.7940627Z tidy check
2019-07-23T14:28:31.6548818Z tidy error: /checkout/src/libstd/sys/cloudabi/mutex.rs:57: trailing whitespace
2019-07-23T14:28:32.6976658Z some tidy checks failed
2019-07-23T14:28:32.6983114Z 2019-07-23T14:28:32.6983114Z 2019-07-23T14:28:32.6983974Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-07-23T14:28:32.6984113Z 2019-07-23T14:28:32.6984171Z 2019-07-23T14:28:32.6999612Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-07-23T14:28:32.6999694Z Build completed unsuccessfully in 0:01:35
2019-07-23T14:28:32.6999694Z Build completed unsuccessfully in 0:01:35
2019-07-23T14:28:33.9959403Z ##[error]Bash exited with code '1'.
2019-07-23T14:28:33.9991535Z ##[section]Starting: Checkout
2019-07-23T14:28:33.9993509Z ==============================================================================
2019-07-23T14:28:33.9993579Z Task : Get sources
2019-07-23T14:28:33.9993627Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

Comment threadsrc/libstd/sys/cloudabi/mutex.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/mod.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/condvar.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/condvar.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/time.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/time.rs Outdated
Comment threadsrc/libstd/sys/cloudabi/time.rs Outdated
@nathanwhit
nathanwhitforce-pushed the fix_mem_uninit_cloudabi branch from e175c87 to b70f217CompareJuly 23, 2019 17:53
@RalfJung

Copy link
Copy Markdown
Member

r? @RalfJung

This looks good to me, thanks!

@bors r+

@bors

bors commented Jul 23, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit b70f217 has been approved by RalfJung

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2019
@nathanwhit

Copy link
Copy Markdown
ContributorAuthor

Thanks for the taking the time to help and leave feedback! It's much appreciated :)

Centril added a commit to Centril/rust that referenced this pull request Jul 23, 2019
… r=RalfJung
Remove uses of mem::uninitialized from std::sys::cloudabi
Addresses rust-lang#62397 for std::sys::cloudabi, excluding the tests within cloudabi, which will be a separate PR
@CentrilCentril mentioned this pull request Jul 23, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 24, 2019
… r=RalfJung
Remove uses of mem::uninitialized from std::sys::cloudabi
Addresses rust-lang#62397 for std::sys::cloudabi, excluding the tests within cloudabi, which will be a separate PR
@CentrilCentril mentioned this pull request Jul 24, 2019
bors added a commit that referenced this pull request Jul 24, 2019
Rollup of 11 pull requests
Successful merges:
- #62261 (Take substs into account in `conservative_is_privately_uninhabited`)
- #62528 (Add joining slices of slices with a slice separator, not just a single item)
- #62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
- #62784 (Add riscv32i-unknown-none-elf target)
- #62808 (Revert "Disable stack probing for gnux32.")
- #62814 (add support for hexagon-unknown-linux-musl)
- #62822 (Improve some pointer-related documentation)
- #62890 (Normalize use of backticks in compiler messages for libsyntax/*)
- #62901 (cleanup: Remove `extern crate serialize as rustc_serialize`s)
- #62905 (Normalize use of backticks in compiler messages for doc)
- #62908 (normalize use of backticks for compiler messages in remaining modules)
Failed merges:
r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Jul 24, 2019
… r=RalfJung
Remove uses of mem::uninitialized from std::sys::cloudabi
Addresses rust-lang#62397 for std::sys::cloudabi, excluding the tests within cloudabi, which will be a separate PR
@CentrilCentril mentioned this pull request Jul 24, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 24, 2019
Rollup of 10 pull requests
Successful merges:
- rust-lang#62641 (Regenerate character tables for Unicode 12.1)
- rust-lang#62716 (state also in the intro that UnsafeCell has no effect on &mut)
- rust-lang#62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
- rust-lang#62772 (Suggest trait bound on type parameter when it is unconstrained)
- rust-lang#62890 (Normalize use of backticks in compiler messages for libsyntax/*)
- rust-lang#62905 (Normalize use of backticks in compiler messages for doc)
- rust-lang#62916 (Add test `self-in-enum-definition`)
- rust-lang#62917 (Always emit trailing slash error)
- rust-lang#62926 (Fix typo in mem::uninitialized doc)
- rust-lang#62927 (use PanicMessage in MIR, kill InterpError::description)
Failed merges:
r? @ghost
bors added a commit that referenced this pull request Jul 24, 2019
Rollup of 10 pull requests
Successful merges:
- #62641 (Regenerate character tables for Unicode 12.1)
- #62716 (state also in the intro that UnsafeCell has no effect on &mut)
- #62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
- #62772 (Suggest trait bound on type parameter when it is unconstrained)
- #62890 (Normalize use of backticks in compiler messages for libsyntax/*)
- #62905 (Normalize use of backticks in compiler messages for doc)
- #62916 (Add test `self-in-enum-definition`)
- #62917 (Always emit trailing slash error)
- #62926 (Fix typo in mem::uninitialized doc)
- #62927 (use PanicMessage in MIR, kill InterpError::description)
Failed merges:
r? @ghost
@bors
bors merged commit b70f217 into rust-lang:masterJul 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@nathanwhit@rust-highfive@bors@RalfJung@sfackler