-
Notifications
You must be signed in to change notification settings - Fork 1.2k
AIX: Only test addresses that are multiples of the size of cmsghdr #4916
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
AIX: Only test addresses that are multiples of the size of cmsghdr #4916
Conversation
c7b3a6a to
9fd9f59
Compare
tgross35
left a comment
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.
Ah sorry about that, I incorrectly assumed the AIX-specific bit was a result of the boundary check issues fixed in that commit. Thanks for the fix!
Cc @gibbz00
|
I'm sorry, but I don't understand how this makes sense. You say that AIX does not apply any padding, yet the payload is required to be a multiple of How do you otherwise deal with payloads that aren't multiples of exactly |
|
... Or in other words, to me it sounds like the AIX C implementation does apply padding, but the Rust implementation doesn't, hence the test failure. If so, then the solution shouldn't be to ignore the test values where the implementations differ, but rather fix the Rust implementation. This may be easier with setting the What kind of test failures were you getting? |
The AIX <sys/socket.h> defines So, the Rust |
The test failed with the following error: Where line 86 is: |
|
Thanks for the quick response. If you don't mind me asking, how does AIX's CMSG_SPACE C definition look like? |
|
|
Oh wow, interesting. So it's not that AIX supports unaligned access, but more so that it doesn't try to account for it at all.
If I'm reading that correctly, isn't the minimum alignment 4 bytes? Not cmsghdr's 16? Did the tests not work with That would explain a lot about how it doesn't affect AIX in practice. Can't think of any cmsg payload that isn't divisible to 4. |
|
Yes, |
…ghdr. (backport <rust-lang#4916>) (cherry picked from commit 85a3691)
Description
AIX does not apply any alignment or padding to ancillary data, and
CMSG_ALIGN()is a no-op. Therefore, we only test addresses that are multiples of the size ofcmsghdron AIX. The original condition for AIX was removed in f391df3, which led to the test failure.Sources
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI