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

ICE: rustdoc lib: violation of UTF-8 char boundary #115369

Closed
marcospb19 opened this issue Aug 30, 2023 · 3 comments
Closed

ICE: rustdoc lib: violation of UTF-8 char boundary #115369

marcospb19 opened this issue Aug 30, 2023 · 3 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@marcospb19
Copy link
Contributor

Command

$ cargo doc

Code

fn main() {}

Cargo.toml:

[package]
name = "example-name"
version = "0.0.0"
edition = "2021"

[dependencies]
axum = "=0.6.20"

It doesn't panic with any crate, but specifically with axum.

Meta

rustc --version --verbose:

rustc 1.74.0-nightly (c469197b1 2023-08-22)
binary: rustc
commit-hash: c469197b19d53a6c45378568f73c00986b20a5a5
commit-date: 2023-08-22
host: x86_64-unknown-linux-gnu
release: 1.74.0-nightly
LLVM version: 17.0.0

Error output

thread 'rustc' panicked at src/librustdoc/passes/collect_intra_doc_links.rs:1446:33:
byte index 2 is not a char boundary; it is inside '“' (bytes 0..3) of `“extractors”`
stack backtrace:
   0:     0x7fd6c0b630fc - std::backtrace_rs::backtrace::libunwind::trace::h05dcd57d35354e09
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fd6c0b630fc - std::backtrace_rs::backtrace::trace_unsynchronized::h760cef756255b640
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fd6c0b630fc - std::sys_common::backtrace::_print_fmt::h96ee9c0f36e8a7ef
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fd6c0b630fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h79540d81556adb82
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fd6c0bc93bc - core::fmt::rt::Argument::fmt::h29465cb5b004890a
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/core/src/fmt/rt.rs:138:9
   5:     0x7fd6c0bc93bc - core::fmt::write::hdd9d58a2540bd20b
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fd6c0b55c1e - std::io::Write::write_fmt::h961ffc893f831cdd
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/io/mod.rs:1714:15
   7:     0x7fd6c0b62ee4 - std::sys_common::backtrace::_print::hf69e02dd8b1274ec
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fd6c0b62ee4 - std::sys_common::backtrace::print::hac9c9d49c3cce28f
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fd6c0b65fda - std::panicking::panic_hook_with_disk_dump::{{closure}}::hf463d7099ec26505
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/panicking.rs:278:22
  10:     0x7fd6c0b65c89 - std::panicking::panic_hook_with_disk_dump::he6e047f25fe029c3
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/panicking.rs:305:9
  11:     0x7fd6c3d155c9 - <rustc_driver_impl[d555860e81f7517b]::install_ice_hook::{closure#0} as core[b361c132967a94b5]::ops::function::FnOnce<(&core[b361c132967a94b5]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7fd6c0b66880 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h92e08cea9685c71d
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/alloc/src/boxed.rs:2021:9
  13:     0x7fd6c0b66880 - std::panicking::rust_panic_with_hook::h816b3d294e59b8e2
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/panicking.rs:733:13
  14:     0x7fd6c0b66607 - std::panicking::begin_panic_handler::{{closure}}::hf7166c733cbf5800
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/panicking.rs:621:13
  15:     0x7fd6c0b63626 - std::sys_common::backtrace::__rust_end_short_backtrace::h8e9dc421bd779484
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7fd6c0b66352 - rust_begin_unwind
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/panicking.rs:617:5
  17:     0x7fd6c0bc57c3 - core::panicking::panic_fmt::h241ae686aabc346b
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/core/src/panicking.rs:67:14
  18:     0x7fd6c0bce41a - core::str::slice_error_fail_rt::h0a25a5762ae30385
  19:     0x7fd6c0bce227 - core::str::slice_error_fail::ha66e4d5bb6c797a8
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/core/src/str/mod.rs:87:9
  20:     0x556ba94439c5 - <rustdoc[2dcce2dbf46f6921]::passes::collect_intra_doc_links::LinkCollector>::resolve_links
  21:     0x556ba943060d - rustdoc[2dcce2dbf46f6921]::passes::collect_intra_doc_links::collect_intra_doc_links
  22:     0x556ba96684c8 - <rustc_session[3a994007c5c0178c]::session::Session>::time::<(rustdoc[2dcce2dbf46f6921]::clean::types::Crate, rustdoc[2dcce2dbf46f6921]::config::RenderOptions, rustdoc[2dcce2dbf46f6921]::formats::cache::Cache), rustdoc[2dcce2dbf46f6921]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  23:     0x556ba9549632 - <rustc_middle[dc00279793427bd1]::ty::context::GlobalCtxt>::enter::<rustdoc[2dcce2dbf46f6921]::main_args::{closure#1}::{closure#0}::{closure#0}, core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>>
  24:     0x556ba966bccc - <scoped_tls[2eaa6cc3c350de3d]::ScopedKey<rustc_span[695785c96b1568a1]::SessionGlobals>>::set::<rustc_interface[4e5594fb201fb041]::interface::run_compiler<core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>, rustdoc[2dcce2dbf46f6921]::main_args::{closure#1}>::{closure#0}, core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>>
  25:     0x556ba9451349 - std[2ba130f3e4ff0dbf]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[4e5594fb201fb041]::util::run_in_thread_pool_with_globals<rustc_interface[4e5594fb201fb041]::interface::run_compiler<core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>, rustdoc[2dcce2dbf46f6921]::main_args::{closure#1}>::{closure#0}, core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>>
  26:     0x556ba969ad6b - <<std[2ba130f3e4ff0dbf]::thread::Builder>::spawn_unchecked_<rustc_interface[4e5594fb201fb041]::util::run_in_thread_pool_with_globals<rustc_interface[4e5594fb201fb041]::interface::run_compiler<core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>, rustdoc[2dcce2dbf46f6921]::main_args::{closure#1}>::{closure#0}, core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b361c132967a94b5]::result::Result<(), rustc_span[695785c96b1568a1]::ErrorGuaranteed>>::{closure#1} as core[b361c132967a94b5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  27:     0x7fd6c0b711e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc8312914ab53fd6a
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/alloc/src/boxed.rs:2007:9
  28:     0x7fd6c0b711e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h926e053874820907
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/alloc/src/boxed.rs:2007:9
  29:     0x7fd6c0b711e5 - std::sys::unix::thread::Thread::new::thread_start::h615369ddd41aad9b
                               at /rustc/c469197b19d53a6c45378568f73c00986b20a5a5/library/std/src/sys/unix/thread.rs:108:17
  30:     0x7fd6c068c9eb - <unknown>
  31:     0x7fd6c0710dfc - <unknown>
  32:                0x0 - <unknown>


rustc version: 1.74.0-nightly (c469197b1 2023-08-22)
platform: x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
@marcospb19 marcospb19 added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 30, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 30, 2023
@leikang123

This comment was marked as off-topic.

@fmease
Copy link
Member

fmease commented Aug 30, 2023

Very likely fixed on the latest nightly (by #115070). Can you double-check that? If so, it's a duplicate of #115064, #115062 and #115116.

@rustbot label -needs-triage -T-compiler T-rustdoc

@leikang123 Please refrain from posting ChatGPT-generated responses, they are not productive.

@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 30, 2023
@marcospb19
Copy link
Contributor Author

Thanks @fmease, indeed fixed by #115070.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ 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

4 participants