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
Hello bindgen team! I am having some issues with bindings generated from Windows USB headers defined in ucxusbdevice.h. Here is a link to a minimal repro I've been able to generate: https://github.com/leon-xd/rust-repros/tree/main/crates/bindgen-size-overflow. I copied relevant definitions and made a new header file that is able to reproduce the issue.
There are four structs that are not generated with the right definition. It seems like they are generated as opaque, but do not have the correct size. In switching from bindgen 0.69.* to 0.71.0 we were able to detect this issue with the introduction of compile time error checking.
A (preferably reduced) C/C++ header file that reproduces the issue
It looks like MSVC (and Clang w/ -ms-extensions) treat USBDEVICE_MGMT_HEADER as an anonymous struct member. I think that bindgen is failing to recognize that, and is then assuming the type is ZeroSized which is why it generates that _address member (I think).
Hello
bindgen
team! I am having some issues with bindings generated from Windows USB headers defined inucxusbdevice.h
. Here is a link to a minimal repro I've been able to generate: https://github.com/leon-xd/rust-repros/tree/main/crates/bindgen-size-overflow. I copied relevant definitions and made a new header file that is able to reproduce the issue.There are four structs that are not generated with the right definition. It seems like they are generated as opaque, but do not have the correct size. In switching from
bindgen
0.69.* to 0.71.0 we were able to detect this issue with the introduction of compile time error checking.A (preferably reduced) C/C++ header file that reproduces the issue
The bindgen flags used to reproduce the issue with the header file
Builder::default()
is used here: https://github.com/leon-xd/rust-repros/blob/main/crates/bindgen-size-overflow/build.rsThe expected bindgen output
The actual bindgen output
The debugging logs generated when running bindgen on this testcase
The text was updated successfully, but these errors were encountered: