ip_mreqn roundtrip test fails for mips64 and sparc64 #1558
Labels
C-testsuite
E-medium
E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
O-mips
O-sparc
Milestone
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: