-
Notifications
You must be signed in to change notification settings - Fork 707
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
Wrong bindings for long double on Linux, but not on macOS #1338
Comments
I suspect it's not picking up that struct definition but the builtin max_align_t? In any case for now the most you can do is basically blacklist it. As long as you don't use it it should be fine. |
Well, I found that Why would this behavior change between macOS and Linux? |
Clang version installed, I'd say. |
This is fixed with newer rust_targets, that support repr(align) or u128 / i128. |
@emilio I know this is closed, but I just realized... for a function |
That's fair. I think we could do multiple things about it:
In any case that's probably worth a separate issue. |
No matter what, you definitely need to notify users who currently might be using code that overflows ASAP, it's a matter of security! Then we can worry about fixing it. |
Additionally, I would "yank" all versions affected by this bug and backport the fix if necessary |
Also, please reopen this issue! |
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
For some reason I cannot generate bindings for
max_align_t
, the generated bindings are really weird, but only on Linux. On macOS, using the exact same code, bindgen generates the followingWhich passes tests and, as far as I can see, works just fine, although it seems to me like a long double should be represented by an unexisting
f128
type?On Linux, the generated bindings are such
Now, not only is this a really weird way to represent the type, I don't understand why it mapped it into a struct, but it is also wrong, and fails tests as show above.
For what it's worth, I'm generating bindings for Aravis. Is there a workaround for now? Why is this happening in an OS-dependent way?
The text was updated successfully, but these errors were encountered: