Skip to content

rustc stack overflows when running cargo doc on a project with nix #59551

Closed
@carado

Description

@carado

On the latest rustc (1.35.0-nightly (e782d79 2019-03-29)) and cargo (1.35.0-nightly (0e35bd8af 2019-03-13)), creating a new blank project on my x86_64 Void Linux using cargo init, and then adding the following dependency:

[dependencies]
nix = "0.13.0"

Produces the following error when cargo doc is ran:

   Compiling libc v0.2.51
   Compiling nix v0.13.0
 Documenting bitflags v1.0.4
    Checking bitflags v1.0.4
    Checking void v1.0.2
 Documenting void v1.0.2
    Checking cfg-if v0.1.7
 Documenting cfg-if v0.1.7
 Documenting libc v0.2.51
 Documenting nix v0.13.0

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: Could not document `nix`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name nix /home/carado/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.13.0/src/lib.rs --cap-lints allow --color always -o /home/carado/tmp/rust-test-5/target/doc -L dependency=/home/carado/tmp/rust-test-5/target/debug/deps --extern bitflags=/home/carado/tmp/rust-test-5/target/debug/deps/libbitflags-f127587879f03710.rmeta --extern cfg_if=/home/carado/tmp/rust-test-5/target/debug/deps/libcfg_if-4c9339e2b578918a.rmeta --extern libc=/home/carado/tmp/rust-test-5/target/debug/deps/liblibc-dae36a3fbc0a5389.rmeta --extern void=/home/carado/tmp/rust-test-5/target/debug/deps/libvoid-a518cf31da1f58f2.rmeta` (signal: 6, SIGABRT: process abort signal)

Unfortunately, using RUST_BACKTRACE=1 cargo doc doesn't change the error output.

Metadata

Metadata

Labels

C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions