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 aligned cmsghdr structs test_cmsg_nxthdr #3183

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

ChrisDenton
Copy link
Contributor

Fixes #3181.

I could find no reason for using unaligned structs in this test.

@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@ChrisDenton
Copy link
Contributor Author

I'm trying to get feedback in case there's something I've missed. I don't quite understand why it's structured the way it is.

@ChrisDenton
Copy link
Contributor Author

It looks like #1239 might have been caused by this too?

@JohnTitor
Copy link
Member

It looks like #1239 might have been caused by this too?

Not sure, could you remove the cfg and related comments?

@ChrisDenton
Copy link
Contributor Author

Ok, that seems to have worked?

@JohnTitor
Copy link
Member

CI on PRs doesn't run on Sparc64, we need:
@bors try

@bors
Copy link
Contributor

bors commented Apr 2, 2023

⌛ Trying commit 2f15111 with merge 4a3180a...

bors added a commit that referenced this pull request Apr 2, 2023
Use aligned `cmsghdr` structs `test_cmsg_nxthdr`

Fixes #3181.

I could find no reason for using unaligned structs in this test.
@bors
Copy link
Contributor

bors commented Apr 2, 2023

💔 Test failed - checks-actions

@ChrisDenton
Copy link
Contributor Author

Oops, I missed a #[cfg].

@bors try

@bors
Copy link
Contributor

bors commented Apr 2, 2023

⌛ Trying commit 4d5f5af with merge 6192971...

bors added a commit that referenced this pull request Apr 2, 2023
Use aligned `cmsghdr` structs `test_cmsg_nxthdr`

Fixes #3181.

I could find no reason for using unaligned structs in this test.
@bors
Copy link
Contributor

bors commented Apr 2, 2023

💔 Test failed - checks-actions

@ChrisDenton
Copy link
Contributor Author

Hm, that still failed. I'll try bumping up the alignment...

@ChrisDenton
Copy link
Contributor Author

@bors try

@bors
Copy link
Contributor

bors commented Apr 2, 2023

⌛ Trying commit 8a0ee82 with merge 62e09af...

bors added a commit that referenced this pull request Apr 2, 2023
Use aligned `cmsghdr` structs `test_cmsg_nxthdr`

Fixes #3181.

I could find no reason for using unaligned structs in this test.
@bors
Copy link
Contributor

bors commented Apr 2, 2023

💔 Test failed - checks-actions

@ChrisDenton
Copy link
Contributor Author

Ok, I don't think I can fix sparc today. It's possible there may still be a problem in the test, or perhaps in CMSG_NXTHDR. But I can't immediately see it. Honestly it would probably be worth rewriting some of the CMSG_ "macros" using modern pointer methods in case that shows up anything. But that's a job for another time.

For now I've aligned the buffer and also cleaned up a few of the pointer bits in case that triggers any debug asserts in the future. Nothing major though.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Alight, thank you for the fix!

@JohnTitor
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Apr 3, 2023

📌 Commit 9102bfb has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 3, 2023

⌛ Testing commit 9102bfb with merge c64bfc5...

@bors
Copy link
Contributor

bors commented Apr 3, 2023

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing c64bfc5 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Apr 3, 2023

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing c64bfc5 to master...

@bors bors merged commit c64bfc5 into rust-lang:master Apr 3, 2023
10 checks passed
@bors
Copy link
Contributor

bors commented Apr 3, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_cmsg_nxthdr fails due to alignment checks for pointer dereferences
4 participants