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

Window Mutex: Document that we properly initialize the SRWLock #53311

Merged
merged 2 commits into from
Aug 24, 2018

Conversation

RalfJung
Copy link
Member

See #35836

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
[00:49:21] ....................................................................................................
[00:49:24] ....................................................................................................
[00:49:26] ....................................................................................................
[00:49:29] ....................................................................................................
[00:49:32] ................iiiiiiiii...........................................................................
[00:49:39] ....................................................................................................
[00:49:43] ......................i.............................................................................
[00:49:46] .................................i..................................................................
[00:49:49] ....................................................................................................

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)

@RalfJung
Copy link
Member Author

The system is going down for power off NOW!

travis-ci/travis-ci#4924

@RalfJung RalfJung changed the title Window Mutex: make sure we properly initialize the SRWLock Window Mutex: Document that we properly initialize the SRWLock Aug 13, 2018
@@ -58,6 +58,8 @@ pub unsafe fn raw(m: &Mutex) -> c::PSRWLOCK {
impl Mutex {
pub const fn new() -> Mutex {
Mutex {
// This works because SRWLOCK_INIT is a NULL pointer, so we are also properly
Copy link
Member

@retep998 retep998 Aug 14, 2018

Choose a reason for hiding this comment

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

Technically SRWLOCK is a struct wrapping a pointer which isn't actually used as a pointer, so SRWLOCK_INIT is zero initializing a struct.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh wow. I guess Windows API doesn't really care about meaningful types?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, I hope.

@TimNN TimNN added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2018
@RalfJung
Copy link
Member Author

r? @retep998

@retep998
Copy link
Member

As much as I'd love to r+ this PR, I don't have such permissions, so someone else will have to actually r+ it.

@Mark-Simulacrum
Copy link
Member

@bors r=retep998

@bors
Copy link
Contributor

bors commented Aug 22, 2018

📌 Commit b7a49e7 has been approved by retep998

@bors bors 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 Aug 22, 2018
@bors
Copy link
Contributor

bors commented Aug 23, 2018

⌛ Testing commit b7a49e7 with merge 8a1ba374f7ae73fd0752f4fc26b9bec5a9268981...

@bors
Copy link
Contributor

bors commented Aug 23, 2018

💔 Test failed - status-travis

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

This comment has been minimized.

@kennytm
Copy link
Member

kennytm commented Aug 23, 2018

@bors retry rollup

Travis hiccups.

@bors bors 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 Aug 23, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 24, 2018
Window Mutex: Document that we properly initialize the SRWLock

See rust-lang#35836
bors added a commit that referenced this pull request Aug 24, 2018
Rollup of 16 pull requests

Successful merges:

 - #53311 (Window Mutex: Document that we properly initialize the SRWLock)
 - #53503 (Discourage overuse of mem::forget)
 - #53545 (Fix #50865: ICE on impl-trait returning functions reaching private items)
 - #53559 (add macro check for lint)
 - #53562 (Lament the invincibility of the Turbofish)
 - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into())
 - #53592 (docs: minor stylistic changes to str/string docs)
 - #53594 (Update RELEASES.md to include clippy-preview)
 - #53600 (Fix a grammatical mistake in "expected generic arguments" errors)
 - #53614 (update nomicon and book)
 - #53617 (tidy: Stop requiring a license header)
 - #53618 (Add missing fmt examples)
 - #53636 (Prefer `.nth(n)` over `.skip(n).next()`.)
 - #53644 (Use SmallVec for SmallCStr)
 - #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs)
 - #53666 (Added rustc_codegen_llvm to compiler documentation.)
@bors bors merged commit b7a49e7 into rust-lang:master Aug 24, 2018
@RalfJung RalfJung deleted the windows-mutex branch September 1, 2018 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: 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.

None yet

7 participants