rust-lang / rust-lang/rust-bindgen

Cannot serialize type kind Opaque with valists and wrap-static-fns

Open
#3,234 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Test fails for aarch64-unknown-linux-gnu.

How to reproduce:

$ cargo run -- --wrap-static-fns bindgen-tests/tests/headers/wrap-static-fns.h -- -target aarch64-unknown-linux-gnu
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/bindgen --wrap-static-fns bindgen-tests/tests/headers/wrap-static-fns.h -- -target aarch64-unknown-linux-gnu`
Unable to generate bindings: codegen error: serialization error at bindgen-tests/tests/headers/wrap-static-fns.h:63:56: Cannot serialize type kind Opaque

Was found when trying to enable that target in CI: https://github.com/rust-lang/rust-bindgen/pull/3217

There are some more hints in the discussions in that PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the cargo run command and inspect bindgen-tests/tests/headers/wrap-static-fns.h at line 63. Read the related discussion in rust-bindgen#3217, then trace serialization of the Opaque type for valists and wrap-static-fns. Done means the aarch64-unknown-linux-gnu command succeeds and the regression is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.