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

Stack overflow when running cargo doc #40936

Closed
flanfly opened this issue Mar 30, 2017 · 2 comments
Closed

Stack overflow when running cargo doc #40936

flanfly opened this issue Mar 30, 2017 · 2 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@flanfly
Copy link

flanfly commented Mar 30, 2017

Running cargo doc crashes with

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: Could not document `panopticon`.
Build failed, waiting for other jobs to finish...
error: build failed

Steps to reproduce:

git clone https://github.com/das-labor/panopticon
cd panopticon
cargo doc

The last working ref is das-labor/panopticon@c460ecd

Meta

rustc --version --verbose:

rustc 1.16.0 (30cf806ef 2017-03-10)
binary: rustc
commit-hash: 30cf806ef8881c41821fbd43e5cf3699c5290c16
commit-date: 2017-03-10
host: x86_64-unknown-linux-gnu
release: 1.16.0
LLVM version: 3.9

Backtrace: N/A

A ulimit -s unlimited does not help. I tried with nightly but that crashes with an (unrelated?) error.

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 31, 2017
@Aaron1011
Copy link
Member

I'd like to work on this issue.

@GuillaumeGomez
Copy link
Member

@Aaron1011: Sure, go ahead.

Aaron1011 added a commit to Aaron1011/rust that referenced this issue Apr 9, 2017
Previously, rustdoc's LibEmbargoVisitor unconditionally visited the
child modules of an external crate. If a module re-exported its parent
via 'pub use super::*', rustdoc would re-walk the parent, leading to
infinite recursion.

This commit makes LibEmbargoVisitor store already visited modules in an
FxHashSet, ensuring that each module is only walked once.

Fixes rust-lang#40936
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 14, 2017
Fix rustdoc infinitely recursing when an external crate reexports itself

Previously, rustdoc's LibEmbargoVisitor unconditionally visited the
child modules of an external crate. If a module re-exported its parent
via `pub use super::*`, rustdoc would re-walk the parent, leading to
infinite recursion.

This commit makes LibEmbargoVisitor store already visited modules in an
FxHashSet, ensuring that each module is only walked once.

Fixes rust-lang#40936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants