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

Use IOV_MAX and UIO_MAXIOV constants in limit vectored I/O #76561

Merged
merged 3 commits into from
Sep 12, 2020
Merged

Use IOV_MAX and UIO_MAXIOV constants in limit vectored I/O #76561

merged 3 commits into from
Sep 12, 2020

Conversation

Thomasdezeeuw
Copy link
Contributor

Also updates the libc dependency to 0.2.77 (from 0.2.74) as the
constants were only recently added.

Related #68042, #75005

r? @Amanieu (also reviewed #75005)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2020
@Thomasdezeeuw
Copy link
Contributor Author

CI failed due to clock drift, could someone restart it?

@tesuji
Copy link
Contributor

tesuji commented Sep 10, 2020

CI failed due to clock drift, could someone restart it?

You have to update Cargo.lock too: cargo update -p libc.

@Thomasdezeeuw
Copy link
Contributor Author

CI failed due to clock drift, could someone restart it?

You have to update Cargo.lock too: cargo update -p libc.

@lzutao I'm ok with doing that, but how is that related to the clock drift?

Also I couldn't get it to only update the libc dependency, is alright to update other dependencies as well?

@tesuji
Copy link
Contributor

tesuji commented Sep 10, 2020

I don't know what clock drift is, but the main problem why CI failed is that
CI enforces Cargo.lock integrity.

error: failed to write /checkout/Cargo.lock

Caused by:
  failed to open: /checkout/Cargo.lock

Running cargo update -p libc will update only libc crate.

@Thomasdezeeuw
Copy link
Contributor Author

I don't know what clock drift is,

Clock drift is when the local clock's reported time differs from the "correct" time as reported by a known good clock.

Running cargo update -p libc will update only libc crate.

This failed initially, but I got it to work. Thanks.

Also updates the libc dependency to 0.2.77 (from 0.2.74) as the
constants were only recently added.
@Thomasdezeeuw
Copy link
Contributor Author

CI is complaining about an unneeded unsafe block in library/std/src/sys/unix/process/process_unix.rs, but I didn't touch that file.

@Amanieu
Copy link
Member

Amanieu commented Sep 10, 2020

It's because you updated the libc dependency. You should fix these errors.

@Thomasdezeeuw
Copy link
Contributor Author

On macOS those function do require unsafe (that's why it didn't show up in my local testing). The definition on Linux: https://docs.rs/libc/0.2.77/libc/fn.WTERMSIG.html (no unsafe), vs https://docs.rs/libc/0.2.77/x86_64-apple-darwin/libc/fn.WTERMSIG.html (unsafe). I've opened rust-lang/libc#1888 for this.

@Amanieu would you be ok with putting #[allow(unused_unsafe)] around them for now? With a comment linking to rust-lang/libc#1888.

@Amanieu
Copy link
Member

Amanieu commented Sep 10, 2020

Put it under a linux-only #[cfg_attr] and add a comment linking to the issue.

This is a work-around for a libc issue:
rust-lang/libc#1888.
@Thomasdezeeuw
Copy link
Contributor Author

@Amanieu CI is now green.

@Amanieu
Copy link
Member

Amanieu commented Sep 11, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Sep 11, 2020

📌 Commit c394624 has been approved by Amanieu

@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 Sep 11, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 12, 2020
…r=Amanieu

Use IOV_MAX and UIO_MAXIOV constants in limit vectored I/O

Also updates the libc dependency to 0.2.77 (from 0.2.74) as the
constants were only recently added.

Related rust-lang#68042, rust-lang#75005

r? @Amanieu (also reviewed rust-lang#75005)
@bors
Copy link
Contributor

bors commented Sep 12, 2020

⌛ Testing commit c394624 with merge 85109af...

@bors
Copy link
Contributor

bors commented Sep 12, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Amanieu
Pushing 85109af to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 12, 2020
@bors bors merged commit 85109af into rust-lang:master Sep 12, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 12, 2020
@Thomasdezeeuw Thomasdezeeuw deleted the iov-constant-limits branch September 12, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

6 participants