rust-lang / rust-lang/rust-bindgen
`_bindgen_union_align` field in generated Rust union results in garbage data on AArch64 (e.g. Apple Silicon)
Open
Nobody has claimed this yet.
bug
I-ABI-bug
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
See https://users.rust-lang.org/t/on-apple-silicon-bindgen-union-is-constructed-with-random-data/54469/ for a write-up and context. This may or may not be a security issue, since it's reading arbitrary memory.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Rust forum write-up and investigate the generated Rust union field named _bindgen_union_align on AArch64, such as Apple Silicon. Reproduce the garbage-data behavior and trace it through bindgen's generated bindings; done means the union no longer contains arbitrary data on the affected target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100