Skip to content

int audit core::{hash, fmt}, std::sync #22700

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

Merged
merged 3 commits into from
Feb 24, 2015
Merged

int audit core::{hash, fmt}, std::sync #22700

merged 3 commits into from
Feb 24, 2015

Conversation

nrc
Copy link
Member

@nrc nrc commented Feb 23, 2015

fmt and hash are pretty straightforward I think. sync is a bit more complex. I thought one or two of the isizes ought to be i32s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).

r? @alexcrichton

@pnkfelix
Copy link
Member

cc #22240

@alexcrichton
Copy link
Member

I thought one or two of the isizes ought to be i32s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).

I think these are fine yeah, they're not showing up in the public API and we could perhaps add an AtomicU32 later in the future.

@alexcrichton
Copy link
Member

@bors: r+ 1db684f

@Manishearth
Copy link
Member

Needs Manishearth@a5009b8 to compile on master.

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
 fmt and hash are pretty straightforward I think. sync is a bit more complex. I thought one or two of the `isize`s ought to be `i32`s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).

r? @alexcrichton
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
@Manishearth
Copy link
Member

Also needs b182cd7

Might want to take a look at that (it only touches tests), since your commit message mentions some trickiness in sync.

@bors bors merged commit 1db684f into rust-lang:master Feb 24, 2015
let ret = LowerHex::fmt(&(*self as uint), f);
f.flags &= !(1 << (FlagV1::Alternate as uint));
f.flags |= 1 << (FlagV1::Alternate as u32);
let ret = LowerHex::fmt(&(*self as u32), f);
Copy link
Contributor

Choose a reason for hiding this comment

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

Casting the pointer to u32 loses part of it on 64bit, see #22854. Should this be usize instead?

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

Successfully merging this pull request may close these issues.

6 participants