Skip to content

bindgen_test_layout_max_align_t test fails on i686 on cryptoki-sys crate #12

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

Closed
nullr0ute opened this issue Mar 26, 2021 · 4 comments · Fixed by #13
Closed

bindgen_test_layout_max_align_t test fails on i686 on cryptoki-sys crate #12

nullr0ute opened this issue Mar 26, 2021 · 4 comments · Fixed by #13
Assignees
Labels
bug Something isn't working

Comments

@nullr0ute
Copy link

When running the tests with bindgen for i686 the tests fail due the size of max_align_t

test bindgen_test_layout_max_align_t ... FAILED
failures:
---- bindgen_test_layout_max_align_t stdout ----
thread 'bindgen_test_layout_max_align_t' panicked at 'assertion failed: `(left == right)`
  left: `16`,
 right: `24`: Size of: max_align_t', /builddir/build/BUILD/cryptoki-sys-0.1.0/target/release/build/cryptoki-sys-3b2c9ff8efdc70bf/out/pkcs11_bindings.rs:3:71904
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
    bindgen_test_layout_max_align_t
test result: FAILED. 22 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
@hug-dev
Copy link
Member

hug-dev commented Mar 26, 2021

Hey! Thanks for reporting, looks very similar to the same one you reported on psa-crypto (here). We can apply the same fix.

@hug-dev hug-dev self-assigned this Mar 26, 2021
@hug-dev hug-dev added the bug Something isn't working label Mar 26, 2021
@nullr0ute
Copy link
Author

I figured it was probably similar, I had forgotten about that report, there's also the same issue on the tss-esapi-sys. Seems like a theme ;-)

@hug-dev
Copy link
Member

hug-dev commented Mar 26, 2021

Alright created a PR on both repos:

By the way, are you compiling those crate with the generate-bindings feature? If you wanted we could add the targets to the list of supported ones so you wouldn't need the bindgen dependency.

@nullr0ute
Copy link
Author

By the way, are you compiling those crate with the generate-bindings feature? If you wanted we could add the targets to the list of supported ones so you wouldn't need the bindgen dependency.

Yes, on this only arm/aarch64/x86_64 was created, on tss-esapi-sys only x86_64 was created. We build for armv7/aarch64/i686/x86_64/ppc64le/s390x so we needed to use bindgen to generate the pieces for all the arches.

vkkoskie added a commit to vkkoskie/rust-cryptoki that referenced this issue Dec 4, 2021
Reverts parallaxsecond#13
See also: parallaxsecond#12

It appears that bindgen no longer generates the code
that this suppression was written for. The resulting
bindings are identical.

Signed-off-by: Keith Koskie <[email protected]>
vkkoskie added a commit to vkkoskie/rust-cryptoki that referenced this issue Jan 28, 2022
Reverts parallaxsecond#13
See also: parallaxsecond#12

It appears that bindgen no longer generates the code
that this suppression was written for. The resulting
bindings are identical.

Signed-off-by: Keith Koskie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants