-
Notifications
You must be signed in to change notification settings - Fork 996
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
ip_mreqn roundtrip test fails for mips64 and sparc64 #1558
Labels
Comments
Based on your godbolt link, looks like rustc is passing |
Not sure either :/ |
bors
added a commit
that referenced
this issue
Jan 22, 2022
Define ip_mreqn on all Linux platforms Closes #1558.
bors
added a commit
that referenced
this issue
Jan 24, 2022
Define ip_mreqn on all Linux platforms Updates #1558.
bors
added a commit
that referenced
this issue
Jan 24, 2022
Define ip_mreqn on all Linux platforms Updates #1558.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See discussion in #1555 . This link contains experiments for Rust and C: https://rust.godbolt.org/z/ak3pec
This struct has 3 fields, where each field is 4 bytes wide. The first two fields are a
struct { u32 }
, while the last fields is ani32
. The struct is 12 bytes wide - no padding.The roundtrip test initializes the struct bytes in Rust to the following values: [0, 1, 2, 3, ..., 11]. It then passes the struct by value to a C function expecting it. This function then reads the bytes of the struct and verifies that they match the values set on the Rust side. This fails, reporting that the last 4 bytes (the ones of the i32) are read as [0, 0, 0, 0] instead if [8, 9, 10, 11].
What we know:
So AFAICT the only thing that might be causing the error is an incorrect "call ABI", where the content of the 3rd struct field is being passed in the wrong register, and when C reads it from the right one, the contents are zeroed.
The text was updated successfully, but these errors were encountered: