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
Compiling bindings (after adding a main function) leads to:
$ rustc --test test.rs -o test # build test harness
...
$ ./test
running 7 tests
test bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1 ... ok
test bindgen_test_layout_rte_ipv6_tuple ... ok
test bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1 ... ok
test bindgen_test_layout_rte_ipv4_tuple ... ok
test bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ... ok
test bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ... ok
test bindgen_test_layout_rte_thash_tuple ... FAILED
failures:
---- bindgen_test_layout_rte_thash_tuple stdout ----
thread 'bindgen_test_layout_rte_thash_tuple' panicked at 'assertion failed: `(left == right)` (left: `36`, right: `48`): Size of: rte_thash_tuple', tests/16-byte-alignment.rs:199
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Expected Results
Predicted and actual union sizes match.
The text was updated successfully, but these errors were encountered:
Fixes alignment errors with new Rust union type
This fix creates a new private field with the required aligned size. This new
private field ensures that the union has the required size.
This fixes: #908
This issue can be reproduced by adding
--unstable-union
totests/headers/16-byte-alignment.h
.Input C/C++ Header
Bindgen Invocation
Actual Results
Bindgen generates:
Compiling bindings (after adding a
main
function) leads to:Expected Results
Predicted and actual union sizes match.
The text was updated successfully, but these errors were encountered: