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

rustdoc panics on openssl #48498

Closed
o01eg opened this issue Feb 24, 2018 · 3 comments
Closed

rustdoc panics on openssl #48498

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

Comments

@o01eg
Copy link
Contributor

o01eg commented Feb 24, 2018

When I trying to document project I gets ICE in rustdoc:

 Documenting openssl v0.9.24
thread 'rustc' panicked at 'Unexpected type DefId(14/0:31 ~ libc[ad41]::c_int[0])', librustdoc/clean/auto_trait.rs:29:18
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at libstd/sys_common/backtrace.rs:59
             at libstd/panicking.rs:206
   3: std::panicking::default_hook
             at libstd/panicking.rs:222
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:400
   5: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:347
   6: rustdoc::clean::get_auto_traits_with_def_id
             at librustdoc/clean/auto_trait.rs:29
             at librustdoc/clean/mod.rs:3372
   7: rustdoc::clean::inline::build_impls
             at librustdoc/clean/inline.rs:246
   8: rustdoc::clean::build_deref_target_impls
             at librustdoc/clean/mod.rs:3431
   9: <rustdoc::doctree::Impl as rustdoc::clean::Clean<alloc::vec::Vec<rustdoc::clean::Item>>>::clean
             at librustdoc/clean/mod.rs:3384
  10: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
             at librustdoc/clean/mod.rs:541
             at /checkout/src/libcore/ops/function.rs:271
             at /checkout/src/libcore/option.rs:404
             at /checkout/src/libcore/iter/mod.rs:2448
             at /checkout/src/liballoc/vec.rs:1906
             at /checkout/src/liballoc/vec.rs:1803
             at /checkout/src/liballoc/vec.rs:1767
             at librustdoc/clean/mod.rs:541
  11: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
             at librustdoc/clean/mod.rs:536
             at /checkout/src/libcore/ops/function.rs:271
             at /checkout/src/libcore/option.rs:404
             at /checkout/src/libcore/iter/mod.rs:1311
             at /checkout/src/liballoc/vec.rs:1829
  12: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
             at /checkout/src/liballoc/vec.rs:1767
             at librustdoc/clean/mod.rs:536
  13: <rustdoc::visit_ast::RustdocVisitor<'a, 'tcx, 'rcx> as rustdoc::clean::Clean<rustdoc::clean::Crate>>::clean
             at librustdoc/clean/mod.rs:166
  14: rustdoc::core::run_core::{{closure}}
             at librustdoc/core.rs:270
  15: rustc::ty::context::TyCtxt::create_and_enter
             at /checkout/src/librustc_driver/driver.rs:1094
             at /checkout/src/librustc/ty/context.rs:1573
             at /checkout/src/libstd/thread/local.rs:377
             at /checkout/src/libstd/thread/local.rs:288
             at /checkout/src/librustc/ty/context.rs:1570
             at /checkout/src/librustc/ty/context.rs:1557
             at /checkout/src/libstd/thread/local.rs:377
             at /checkout/src/libstd/thread/local.rs:288
             at /checkout/src/librustc/ty/context.rs:1554
             at /checkout/src/librustc/ty/context.rs:1197
  16: rustdoc::core::run_core
             at /checkout/src/librustc_driver/driver.rs:1007
             at librustdoc/core.rs:217

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.26.0-dev (b0a8620ed 2018-02-24) running on x86_64-unknown-linux-gnu

error: Could not document `openssl`.

Compiler version:

$ rustc --verbose --version
rustc 1.26.0-dev (b0a8620ed 2018-02-24)
binary: rustc
commit-hash: b0a8620ed639d5085d7e1cca3626681a6e4e328e
commit-date: 2018-02-24
host: x86_64-unknown-linux-gnu
release: 1.26.0-dev
LLVM version: 6.0

Compilation finishes without issues.

@pietroalbini pietroalbini added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 24, 2018
@pietroalbini
Copy link
Member

pietroalbini commented Feb 24, 2018

Reproduced this with openssl version 0.9.24 (doesn't reproduce on the latest version) on nightly: beta or stable are not affected. Also updated the issue description with the full stack trace.

If this can be relevant, beta and stable are reporting a bunch of pullmark warnings, and this error:

error: unknown start of token: `
  --> <stdin>:12:2
   |
12 | [`BIGNUM`]: https://wiki.openssl.org/index.php/Manual:Bn_internal(3)
   |  ^
   |
help: unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it's not
  --> <stdin>:12:2
   |
12 | [`BIGNUM`]: https://wiki.openssl.org/index.php/Manual:Bn_internal(3)
   |  ^

@GuillaumeGomez
Copy link
Member

I think it's the same issue than #48463.

@frewsxcv
Copy link
Member

confirmed this is fixed in the latest nightly


reproducing the issue with nightly-2018-02-23:

rustc 1.26.0-nightly (063deba92 2018-02-23)
binary: rustc
commit-hash: 063deba92e44809125a433ca6e6c1ad0993313bf
commit-date: 2018-02-23
host: x86_64-apple-darwin
release: 1.26.0-nightly
LLVM version: 6.0
 Documenting openssl v0.9.4 (file:///Users/corey/dev/rust-openssl/openssl)
thread 'rustc' panicked at 'Unexpected type DefId(12/0:31 ~ libc[93ed]::c_int[0])', librustdoc/clean/auto_trait.rs:29:18
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.26.0-nightly (063deba92 2018-02-23) running on x86_64-apple-darwin

error: Could not document `openssl`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name openssl openssl/src/lib.rs -o /Users/corey/dev/rust-openssl/target/doc -L dependency=/Users/corey/dev/rust-openssl/target/debug/deps --extern openssl_sys=/Users/corey/dev/rust-openssl/target/debug/deps/libopenssl_sys-fc712bbb2e091aa2.rlib --extern bitflags=/Users/corey/dev/rust-openssl/target/debug/deps/libbitflags-c3841cf086926ed6.rlib --extern lazy_static=/Users/corey/dev/rust-openssl/target/debug/deps/liblazy_static-27d6f4600a73ac55.rlib --extern libc=/Users/corey/dev/rust-openssl/target/debug/deps/liblibc-c4a029400d8b931b.rlib --cfg ossl110 --cfg osslconf="OPENSSL_NO_MD2" --cfg osslconf="OPENSSL_NO_RC5" --cfg osslconf="OPENSSL_THREADS" --cfg osslconf="OPENSSL_NO_ASAN" --cfg osslconf="OPENSSL_NO_CRYPTO_MDEBUG" --cfg osslconf="OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE" --cfg osslconf="OPENSSL_NO_EGD" --cfg osslconf="OPENSSL_NO_FUZZ_AFL" --cfg osslconf="OPENSSL_NO_FUZZ_LIBFUZZER" --cfg osslconf="OPENSSL_NO_HEARTBEATS" --cfg osslconf="OPENSSL_NO_MSAN" --cfg osslconf="OPENSSL_NO_SCTP" --cfg osslconf="OPENSSL_NO_SSL_TRACE" --cfg osslconf="OPENSSL_NO_SSL3" --cfg osslconf="OPENSSL_NO_SSL3_METHOD" --cfg osslconf="OPENSSL_NO_UBSAN" --cfg osslconf="OPENSSL_NO_UNIT_TEST" --cfg osslconf="OPENSSL_NO_WEAK_SSL_CIPHERS" --cfg osslconf="OPENSSL_NO_AFALGENG" --cfg osslconf="OPENSSL_CPUID_OBJ"` (exit code: 101)

confirming the issue is fixed with nightly-2018-03-25:

rustc 1.26.0-nightly (482a913fb 2018-03-25)
binary: rustc
commit-hash: 482a913fb337855072a53c0d602cd19947f45285
commit-date: 2018-03-25
host: x86_64-apple-darwin
release: 1.26.0-nightly
LLVM version: 6.0
 Documenting openssl v0.9.4 (file:///Users/corey/dev/rust-openssl/openssl)
    Finished dev [unoptimized + debuginfo] target(s) in 16.60 secs

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-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. 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