You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this error when trying to generate bindings for Fio.
Input C/C++ Header
typedeflong a;
typedef b;
typedef a c;
typedefstruct {
union {
c d
};
} e;
structthread_stat {
b f;
e g;
c h __attribute__((aligned(8)))
} __attribute__((packed));
But bindgen is producing the wrong struct layout for thread_data.
It calculates the wrong offset for client_type.
Include the layout tests after all, to help catch bugs like this.
The layout bug was previously just an annoyance, but with fio-3.30 it
causes failures at runtime.
rust-lang/rust-bindgen#2101
asomers
added a commit
to bfffs/bfffs
that referenced
this issue
Apr 21, 2022
bindgen generates incorrect code for C structs that use
`__attribute__((aligned(8)))`. Work around that bug by changing some
fields's types manually, to give them a different alignment. bfffs-fio
doesn't use those fields anyway.
This change may need to be reapplied after any future fio API updates.
rust-lang/rust-bindgen#2101
asomers
added a commit
to bfffs/bfffs
that referenced
this issue
Apr 21, 2022
bindgen produces the wrong struct layout for thread_data. It calculates
the wrong offset for client_type. Workaround the bug by binding the
offending type as opaque. In that case, bindgen calculates its size
correctly.
Include the layout tests after all, to help catch bugs like this.
The layout bug was previously just an annoyance, but with fio-3.30 it
causes failures at runtime.
rust-lang/rust-bindgen#2101
I encountered this error when trying to generate bindings for Fio.
Input C/C++ Header
Bindgen Invocation
Actual Results
and/or
Expected Results
No errors from the layout tests
The text was updated successfully, but these errors were encountered: