Repository navigation
1.98 beta rustdoc regression: "reached the configured maximum number of stack frames" #159477
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
This regression was found by the 1.98 beta rustdoc crater run.
[INFO] [stdout] error[E0080]: reached the configured maximum number of stack frames
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/fmt/num_buffer.rs:26:45
[INFO] [stdout] |
[INFO] [stdout] = note: evaluation of `<usize as core::fmt::NumBufferTrait>::Buf::{constant#0}` failed inside this call
[INFO] [stdout] ::: /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/fmt/num_buffer.rs:39:1
[INFO] [stdout] |
[INFO] [stdout] = note: in this macro invocation
[INFO] [stdout] note: inside `core::num::<impl usize>::checked_ilog10`
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/uint_macros.rs:1914:32
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/mod.rs:1449:4
[INFO] [stdout] ::: /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/mod.rs:1473:5
[INFO] [stdout] |
[INFO] [stdout] = note: in this macro invocation
[INFO] [stdout] note: inside `core::num::NonZero::<usize>::ilog10`
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/nonzero.rs:1818:12
[INFO] [stdout] ::: /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/nonzero.rs:2506:1
[INFO] [stdout] |
[INFO] [stdout] = note: in this macro invocation
[INFO] [stdout] note: inside `core::num::imp::int_log10::usize`
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/imp/int_log10.rs:132:4
[INFO] [stdout] note: inside `core::num::imp::int_log10::u64`
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/imp/int_log10.rs:104:21
[INFO] [stdout] ::: /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/num/imp/int_log10.rs:117:1
[INFO] [stdout] |
[INFO] [stdout] = note: in this macro invocation
[INFO] [stdout] note: inside `core::ub_checks::check_language_ub`
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/intrinsics/mod.rs:2458:8
[INFO] [stdout] --> /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/ub_checks.rs:98:4
[INFO] [stdout] ::: /rustc/6b3fa26749ab40e159b2dd5cf577acaaf5902772/library/core/src/ub_checks.rs:107:5
[INFO] [stdout] |
[INFO] [stdout] = note: in this macro invocation
[INFO] [stdout] = note: this error originates in the macro `impl_NumBufferTrait` which comes from the expansion of the macro `const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Activity
theemathas commentedon Jul 19, 2026
Minimal reproducer: run
cargo +beta docon the following code inlib.rs#
theemathas commentedon Jul 19, 2026
Bisection results:
The only relevant PR from that rollup seems to be #157976. cc @Amanieu @GuillaumeGomez
theemathas commentedon Jul 19, 2026
In rustdoc, is
recursion_limitspecified in a normal crate supposed to affect the recursion limit in std?theemathas commentedon Jul 19, 2026
Code from version 0.5.2:
Code from version 0.6.0:
From this, I think that the crate author incorrectly thought that the
recursion_limitattribute would somehow stop infinite recursion at run time, and therefore misused the attribute.Thanks to zachs18 on the rust community discord for pointing this out.
theemathas commentedon Jul 21, 2026
See discussion at https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Is.20.60recursion_limit.60.20supposed.20to.20have.20cross-crate.20effects.3F/with/611759309
camelid commentedon Jul 22, 2026
This is fixed by #159623, though I don't think it's worth backporting the PR since the trigger is a very weird edge case.
apiraino commentedon Jul 23, 2026
Cool, thanks @camelid. If no backport is necessary and nothing else is needed here, feel free to close this issue.
@rustbot label -I-prioritize