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

crash bad-lit-suffixes.rs #3967

Closed
matthiaskrgr opened this issue Apr 15, 2019 · 2 comments
Closed

crash bad-lit-suffixes.rs #3967

matthiaskrgr opened this issue Apr 15, 2019 · 2 comments
Assignees
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@matthiaskrgr
Copy link
Member

cc #3142

crash is reduced from rustc src/test/ui/parser/bad-lit-suffixes.rs

fn main() {
    1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal
}
RUST_BACKTRACE=Full cargo clippy
    Checking crash v0.1.0 (/tmp/crash)
error: invalid suffix `suffix` for numeric literal
 --> src/main.rs:2:5
  |
2 |     1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal
  |     ^^^^^^^^^^ invalid suffix `suffix`
  |
  = help: the suffix must be one of the integral types (`u32`, `isize`, etc)

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/libcore/result.rs:997:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   6: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   7: rust_begin_unwind
             at src/libstd/panicking.rs:308
   8: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   9: core::result::unwrap_failed
  10: <clippy_lints::literal_representation::LiteralRepresentation as rustc::lint::EarlyLintPass>::check_expr
  11: <rustc::lint::context::EarlyLintPassObjects as rustc::lint::EarlyLintPass>::check_expr
  12: <rustc::lint::context::EarlyContextAndPass<T> as syntax::visit::Visitor>::visit_expr
  13: syntax::visit::walk_fn
  14: syntax::visit::walk_item
  15: <rustc::lint::context::EarlyContextAndPass<T> as syntax::visit::Visitor>::visit_item
  16: syntax::visit::walk_crate
  17: rustc::lint::context::early_lint_crate
  18: rustc::lint::context::check_ast_crate
  19: rustc::util::common::time
  20: rustc_interface::passes::BoxedResolver::access::{{closure}}
  21: rustc_interface::passes::configure_and_expand::{{closure}}
  22: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::access
  23: rustc_interface::queries::Query<T>::compute
  24: rustc_interface::queries::Query<T>::compute
  25: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::prepare_outputs
  26: rustc_interface::interface::run_compiler_in_existing_thread_pool
  27: std::thread::local::LocalKey<T>::with
  28: scoped_tls::ScopedKey<T>::set
  29: syntax::with_globals
query stack during panic:
end of query stack
error: aborting due to previous error


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.35.0-nightly (3de010678 2019-04-11) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental -C target-cpu=native --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `crash`.

To learn more, run the command again with --verbose.

clippy 0.0.212 (37f5c1e 2019-04-09)

@matthiaskrgr matthiaskrgr added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels Apr 15, 2019
@phansch phansch self-assigned this Apr 16, 2019
@phansch
Copy link
Member

phansch commented Apr 16, 2019

I think this was fixed in #3931, could you try with a later Clippy version?

@matthiaskrgr
Copy link
Member Author

Ah indeed it does not crash anymore. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants