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

cargo-semver-checks Crash Report #987

Open
jalil-salame opened this issue Oct 25, 2024 · 2 comments
Open

cargo-semver-checks Crash Report #987

jalil-salame opened this issue Oct 25, 2024 · 2 comments
Labels
C-bug Category: doesn't meet expectations

Comments

@jalil-salame
Copy link

Steps to reproduce the bug with the above code

I am testing sgx-quote and my PR on it.

  1. Create a rustdoc-json file manually (I used RUSTDOCFLAGS="-Z unstable-options --document-private-items --document-hidden-items --output-format=json --cap-lints=allow" cargo +nightly doc --lib --no-deps)
  2. Run cargo semver-checks while setting --current-rustdoc=target/doc/crate_name.json but not setting --baseline-rustdoc (leaving it unset or setting --baseline-version/--baseline-rev).
  3. Watch the crash happen

Actual Behaviour

cargo-semver-checks crashes

Expected Behaviour

cargo-semver-checks should work as normal

Generated System Information

System information:

Software version

cargo-semver-checks 0.36.0

Operating system

Linux 6.6.57

Command-line

/home/jalil/.local/share/cargo/bin/cargo-semver-checks semver-checks --bugreport

cargo version

> cargo -V
cargo 1.84.0-nightly (cf53cc54b 2024-10-18)

Compile time information

  • Profile: release
  • Target triple: x86_64-unknown-linux-gnu
  • Family: unix
  • OS: linux
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2
  • Host: x86_64-unknown-linux-gnu

Cargo build configuration:

[registry]
token = "REDACTED"

Build Configuration

Nothing of note (just setting CARGO_HOME)

Additional Context

name = "cargo-semver-checks"
operating_system = "NixOS 24.5.0 [64-bit]"
crate_version = "0.36.0"
explanation = """
Panic occurred in file '/home/jalil/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-semver-checks-0.36.0/src/rustdoc_gen.rs' at line 773
"""
cause = "this should be impossible: InvalidKrateName(InvalidCharacter { invalid: '<', index: 0 })"
method = "Panic"
backtrace = """
   0:     0x5585ed034f04 - rust_begin_unwind
   1:     0x5585ebbe85a5 - core::panicking::panic_fmt::hdb89b5c14a056cec
   2:     0x5585ebbe8ad3 - core::result::unwrap_failed::h850510ea6c159887
   3:     0x5585ebef37f2 - <cargo_semver_checks::rustdoc_gen::RustdocFromRegistry as cargo_semver_checks::rustdoc_gen::RustdocGenerator>::load_rustdoc::h42d434d4ed79632d
   4:     0x5585ebeb5e92 - cargo_semver_checks::generate_versioned_crates::hd84e2714c8d60315
   5:     0x5585ebf6b8be - cargo_semver_checks::Check::check_release::{{closure}}::h52545f2c99e48089
   6:     0x5585ebef65c2 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h2024869b0b73d614
   7:     0x5585ebd9090c - alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter::hfbf4c87b15fdcd45
   8:     0x5585ebeb48a3 - cargo_semver_checks::Check::check_release::h710c6566250f8745
   9:     0x5585ebbecf6d - cargo_semver_checks::exit_on_error::h12b290f9f6301440
  10:     0x5585ebbec3d4 - cargo_semver_checks::main::h4c8608096b82b21a
  11:     0x5585ebc20443 - std::sys_common::backtrace::__rust_begin_short_backtrace::he0d47c16c887dc12
  12:     0x5585ebc13b99 - std::rt::lang_start::{{closure}}::h7415b008c476ed70
  13:     0x5585ed034e04 - std::panicking::try::ha86251cf5daa9bea
  14:     0x5585ed01f6bb - std::rt::lang_start_internal::ha6a51778162f8d22
  15:     0x5585ebbfa3a5 - main
  16:     0x7f2813edb10e - __libc_start_call_main
  17:     0x7f2813edb1c9 - __libc_start_main@@GLIBC_2.34
  18:     0x5585ebbe8ee5 - _start
  19:                0x0 - <unresolved>
"""
@jalil-salame jalil-salame added the C-bug Category: doesn't meet expectations label Oct 25, 2024
@jalil-salame
Copy link
Author

I forgot to mention; setting both --baseline-rustdoc and --current-rustdoc or neither does not trigger the panic, as well as setting just --baseline-rustdoc

@obi1kenobi
Copy link
Owner

obi1kenobi commented Oct 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: doesn't meet expectations
Projects
None yet
Development

No branches or pull requests

2 participants