lu-zero/cargo-c

Segmentation fault with vendored-openssl feature

quietvoid opened this issue · 4 comments

Hello, I'm trying to figure out what's happening with the cargo-c package on Arch Linux and found that the package was using --all-features when building, which seems to cause a segfault.
I've posted some info here: https://bugs.archlinux.org/task/77373

The related backtrace: https://0x0.st/oC1n.txt

So far I've been able to use cargo cbuild only when:

  • installing with cargo install cargo-c
  • building the Arch package without --all-features

I'm still confused as to what the problem is. Building a working cargo-c and using it also seems to make the non-working binaries work again.
So it might be deeper in cargo itself.

Do not build it with --all-features, Arch should have a good openssl in its system, does cargo with features=vendored-openssl show the same problem?

does cargo with features=vendored-openssl show the same problem?

Yes, in fact it does.
To reproduce, I've built it with cargo build --release --features=vendored-openssl, then deleted both RUSTUP_HOME and CARGO_HOME directories.
Before reinstalling rustup and the toolchain.

Then running the built cargo binary with build segfaults.

So it definitely seems like a cargo problem.

It is worth reporting, but I would suggest you to depend on the system openssl on Arch nonetheless ^^;

Yes, this is something the Arch package maintainer should be fixing.
I'll move this to the cargo repo, thanks!