-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustdoc stack overflow on mutually recusive Deref implementation #85095
Comments
I tested by cloning the pr, running |
I've done more testing, and #84867 does solve part of the issue. 0001-fix-infinite-recursion-on-sidebar_deref_methods.patch.gz (gziped as Github wouldn't accept it otherwise) |
…cursive-deref, r=jyn514 fix rustdoc stack overflow on mutually recursive Deref fix rust-lang#85095 fix rust-lang#85037
I tried this code:
Trying to run rustdoc with
rustdoc lib.rs
I expected to see this happen: I'm not sure actually, probably an ICE, but I'd prefer it either detect and accept recursion, or detect and reject with a proper error message.
Instead, this happened: I get a stack overflow
GDB tells me
rustdoc::html::render::sidebar_deref_methods
is on the stack around 17 thousand times(when running in GDB, it actually segfaulted at
<alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
instead of stack-overflowing)impl Deref<Target=A> for A
does not seems to pose problemsMeta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: