Skip to content
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

build fails with (signal: 11, SIGSEGV: invalid memory reference) #1504

Closed
parniere opened this issue Jan 28, 2019 · 4 comments
Closed

build fails with (signal: 11, SIGSEGV: invalid memory reference) #1504

parniere opened this issue Jan 28, 2019 · 4 comments
Labels

Comments

@parniere
Copy link

Hi,

I try to build the user guide's project, but unfortunately I encounter a SIGSEV while building

$ git clone https://github.com/fitzgen/bindgen-tutorial-bzip2-sys

$ cargo -V
cargo 1.32.0 (8610973aa 2019-01-02)

$ cargo build

error: failed to run custom build command for bindgen-tutorial-bzip2-sys v0.1.0 (/home/opa/DEV/rust/bindgen-tutorial-bzip2-sys)
process didn't exit successfully: /home/opa/DEV/rust/bindgen-tutorial-bzip2-sys/target/debug/build/bindgen-tutorial-bzip2-sys-85aebf905d83cf47/build-script-build (signal: 11, SIGSEGV: invalid memory reference)

I attached gdb backtrace:
gdb.txt

It seems that the crash is located in LLVM.

Here is the version of clang I use :

$ clang -v
clang version 7.0.1 (Fedora 7.0.1-1.fc29)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

Regards

Olivier

@emilio
Copy link
Contributor

emilio commented Jan 28, 2019

I assume that's using bindgen 0.47.0? Can you repro with 0.46.0 if so? It might be a regression from the recent clang-sys update.

@emilio emilio added the bug label Jan 28, 2019
@emilio
Copy link
Contributor

emilio commented Jan 28, 2019

I just tested and couldn't repro. You can downgrade bindgen in that project like so:

$ cargo update -p bindgen --precise 0.46.0                                                                                                                                                                      
    Updating crates.io index
    Updating bindgen v0.47.0 -> v0.46.0
    Updating clang-sys v0.27.0 -> v0.26.4

@parniere
Copy link
Author

Indeed downgrading bindgen from 0.47.0 to 0.46.0 corrects the issue.
Thanks

@emilio
Copy link
Contributor

emilio commented Jan 28, 2019

cc @KyleMayes, seems another regression from #1489.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants