Skip to content

-Z hir-stats always panics? #43232

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
zackmdavis opened this issue Jul 14, 2017 · 0 comments
Closed

-Z hir-stats always panics? #43232

zackmdavis opened this issue Jul 14, 2017 · 0 comments
Labels
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.

Comments

@zackmdavis
Copy link
Member

$ cat scratch.rs 
fn main() {}
$ RUST_BACKTRACE=1 rustc scratch.rs -Z hir-stats

PRE EXPANSION AST STATS

Name                Accumulated Size         Count     Item Size
----------------------------------------------------------------
Mod                               40             1            40
FnDecl                            48             1            48
Block                             48             1            48
Item                             248             1           248
----------------------------------------------------------------
Total                            384


POST EXPANSION AST STATS

Name                Accumulated Size         Count     Item Size
----------------------------------------------------------------
Mod                               40             1            40
FnDecl                            48             1            48
Block                             48             1            48
PathSegment                      128             4            32
Attribute                        240             2           120
Item                             744             3           248
----------------------------------------------------------------
Total                          1_248

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.20.0-nightly (720c596ec 2017-07-08) running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor', /checkout/src/librustc_passes/hir_stats.rs:110:8
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:380
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:390
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic_new
   6: <rustc_passes::hir_stats::StatCollector<'v> as rustc::hir::intravisit::Visitor<'v>>::nested_visit_map
   7: <rustc_passes::hir_stats::StatCollector<'v> as rustc::hir::intravisit::Visitor<'v>>::visit_fn
   8: <rustc_passes::hir_stats::StatCollector<'v> as rustc::hir::intravisit::Visitor<'v>>::visit_item
   9: <rustc_passes::hir_stats::StatCollector<'v> as rustc::hir::intravisit::Visitor<'v>>::visit_mod
  10: rustc_passes::hir_stats::print_hir_stats
  11: rustc_driver::driver::phase_2_configure_and_expand
  12: rustc_driver::driver::compile_input
  13: rustc_driver::run_compiler
@Mark-Simulacrum Mark-Simulacrum added 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. C-bug Category: This is a bug. labels Jul 19, 2017
kennytm added a commit to kennytm/rust that referenced this issue Aug 12, 2017
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 13, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

2 participants