rust-lang / rust-lang/rust-bindgen

Build fails with (signal: 11, SIGSEGV: invalid memory reference)

Open
#1,972 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug I-needs-reduced-test-case
Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

I'm on macOS 10.15.7.
I'm working on this. I tried with nightly and stable.
The build.rs uses bindgen 0.56.0.

RUST_BACKTRACE=1 RUST_LOG=bindgen cargo +stable build

Gets me:

error: failed to run custom build command for `libfive-sys v0.1.0 (/Users/moritz/code/crates/libfive-sys)`

Caused by:
  process didn't exit successfully: `/Users/moritz/code/crates/libfive-sys/target/debug/build/libfive-sys-7728230ca907fc6d/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
❯ clang -v
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

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

Start with the libfive-sys build.rs configuration and the reported bindgen 0.56.0 invocation using cargo +stable. Reproduce the SIGSEGV on macOS 10.15.7 with Apple clang 12.0.0.32.28, then identify whether the failure is in bindgen or its inputs; done means the custom build no longer crashes and the binding build completes.

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.