-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Update libc and some fixes for x86_64-unknown-linux-gnux32 #45391
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
The libstd tests fails in my machine, let's see on travis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
src/libcore/tests/hash/sip.rs
Outdated
@@ -249,12 +249,21 @@ fn test_hash_usize() { | |||
assert!(hash(&(val as u64)) != hash(&(val as usize))); | |||
assert_eq!(hash(&(val as u32)), hash(&(val as usize))); | |||
} | |||
#[test] #[cfg(target_arch = "x86_64")] | |||
|
|||
#[test] #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've got existing tests for x86/x86_64, perhaps those could just switch to being two tests based on target_pointer_width?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/libstd/sys/unix/condvar.rs
Outdated
@@ -92,7 +92,16 @@ impl Condvar { | |||
assert_eq!(r, 0); | |||
|
|||
// Nanosecond calculations can't overflow because both values are below 1e9. | |||
let nsec = dur.subsec_nanos() as libc::c_long + now.tv_nsec as libc::c_long; | |||
// HACK: add support to linux x32, the original code was |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary b/c the values are always < 1e9? Doesn't that mean we can basically cast to "anything reasonable" here and expect it to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use i32?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that could work? It just seemed like the extra casting wasn't necessary here given the various constraints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As subsec_nanos is u32, I opted to use u32. Both i32 and u32 are fine.
src/ci/docker/x86_64-gnu/Dockerfile
Outdated
ENV HOSTS=x86_64-unknown-linux-gnu | ||
|
||
ENV TARGETS=x86_64-unknown-linux-gnu | ||
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan on leaving this permanently? It looks like we don't have a lot of extra time on this builder unfortunately (the last one clocked in at 1h40m)...
I'd imagine though that once we get the test suite passing once it's probably pretty unlikely to regress?
Looks like maybe something related to stack walking is odd?
|
@alexcrichton I squashed the commits and disable the gnux32 tests. I also opened the issue #45416 to track the failures. |
Ok! Is this ready to go? (did you mean to add ignore annotations to all affected tests?) |
I think this is ready to go. This will allows others to test the target with the fixed libc. I think you are correct about the stack walk odds. I will be out for some time now, but it would be great if someone could take a look at it. |
@bors: r+ |
📌 Commit e57ee3d has been approved by |
Update libc and some fixes for x86_64-unknown-linux-gnux32
☀️ Test successful - status-appveyor, status-travis |
No description provided.