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

compile-fail\incr_comp_with_macro_export.rs fails #45062

Closed
Zoxc opened this issue Oct 6, 2017 · 2 comments
Closed

compile-fail\incr_comp_with_macro_export.rs fails #45062

Zoxc opened this issue Oct 6, 2017 · 2 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Oct 6, 2017

On master ed1cffd x86_64-pc-windows-msvc

compile-fail\incr_comp_with_macro_export.rs fails:

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.22.0-dev running on x86_64-pc-windows-msvc

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

thread 'rustc' panicked at 'capacity overflow', src\libcore\option.rs:839:4
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::unwind_backtrace
             at .\src\libstd\sys\windows\backtrace\mod.rs:65
   1: std::sys_common::backtrace::print
             at .\src\libstd\sys_common\backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at .\src\libstd\panicking.rs:381
   3: std::panicking::default_hook
             at .\src\libstd\panicking.rs:391
   4: std::panicking::rust_panic_with_hook
             at .\src\libstd\panicking.rs:577
   5: std::panicking::begin_panic<alloc::string::String>
             at .\src\libstd\panicking.rs:538
   6: std::panicking::begin_panic_fmt
             at .\src\libstd\panicking.rs:522
   7: std::panicking::rust_begin_panic
             at .\src\libstd\panicking.rs:498
   8: core::panicking::panic_fmt
             at .\src\libcore\panicking.rs:71
   9: core::option::expect_failed
             at .\src\libcore\option.rs:839
  10: alloc::raw_vec::RawVec<(rustc::session::config::OutputType, alloc::string::String), alloc::heap::Heap>::allocate_in<(rustc::session::config::OutputType, alloc::string::String),alloc::heap::Heap>
             at .\src\liballoc\raw_vec.rs:111
  11: serialize::serialize::Decoder::read_seq<serialize::opaque::Decoder,alloc::vec::Vec<(rustc::session::config::OutputType, alloc::string::String)>,closure>
             at .\src\libserialize\serialize.rs:244
  12: serialize::serialize::{{impl}}::decode<(rustc::session::config::OutputType, alloc::string::String),serialize::opaque::Decoder>
             at .\src\libserialize\serialize.rs:560
  13: serialize::serialize::Decoder::read_struct<serialize::opaque::Decoder,rustc::dep_graph::graph::WorkProduct,closure>
             at .\src\libserialize\serialize.rs:197
  14: rustc::dep_graph::graph::{{impl}}::decode<serialize::opaque::Decoder>
             at .\src\librustc\dep_graph\graph.rs:646
  15: serialize::serialize::Decoder::read_struct<serialize::opaque::Decoder,rustc_incremental::persist::data::SerializedWorkProduct,closure>
             at .\src\libserialize\serialize.rs:197
  16: rustc_incremental::persist::data::{{impl}}::decode<serialize::opaque::Decoder>
             at .\src\librustc_incremental\persist\data.rs:19
  17: serialize::serialize::Decoder::read_seq<serialize::opaque::Decoder,alloc::vec::Vec<rustc_incremental::persist::data::SerializedWorkProduct>,closure>
             at .\src\libserialize\serialize.rs:244
  18: serialize::serialize::{{impl}}::decode<rustc_incremental::persist::data::SerializedWorkProduct,serialize::opaque::Decoder>
             at .\src\libserialize\serialize.rs:560
  19: rustc_incremental::persist::load::dep_graph_tcx_init
             at .\src\librustc_incremental\persist\load.rs:48
  20: std::thread::local::LocalKey<core::cell::Cell<core::option::Option<(const rustc::ty::context::tls::ThreadLocalGlobalCtxt*, const rustc::ty::context::tls::ThreadLocalInterners*)>>>::with<core::cell::Cell<core::option::Option<(const rustc::ty::context::tls::ThreadLocalGlobalCtxt*, const rustc::ty::context::tls::ThreadLocalInterners*)>>,closure,core::result::Result<core::result::Result<(rustc::session::config::OutputFilenames, rustc_trans::back::write::OngoingCrateTranslation, rustc::dep_graph::graph::DepGraph), rustc::session::CompileIncomplete>, rustc::session::CompileIncomplete>>
             at .\src\libstd\thread\local.rs:291
  21: rustc::ty::context::tls::enter<closure,core::result::Result<core::result::Result<(rustc::session::config::OutputFilenames, rustc_trans::back::write::OngoingCrateTranslation, rustc::dep_graph::graph::DepGraph), rustc::session::CompileIncomplete>, rustc::session::CompileIncomplete>>
             at .\src\librustc\ty\context.rs:1474
  22: std::thread::local::LocalKey<core::cell::Cell<fn(syntax_pos::span_encoding::Span, mut core::fmt::Formatter*) -> core::result::Result<(), core::fmt::Error>>>::with<core::cell::Cell<fn(syntax_pos::span_encoding::Span, mut core::fmt::Formatter*) -> core::result::Result<(), core::fmt::Error>>,closure,core::result::Result<core::result::Result<(rustc::session::config::OutputFilenames, rustc_trans::back::write::OngoingCrateTranslation, rustc::dep_graph::graph::DepGraph), rustc::session::CompileIncomplete>, rustc::session::CompileIncomplete>>
             at .\src\libstd\thread\local.rs:291
  23: rustc::ty::context::tls::enter_global<closure,core::result::Result<core::result::Result<(rustc::session::config::OutputFilenames, rustc_trans::back::write::OngoingCrateTranslation, rustc::dep_graph::graph::DepGraph), rustc::session::CompileIncomplete>, rustc::session::CompileIncomplete>>
             at .\src\librustc\ty\context.rs:1458
  24: rustc::ty::context::TyCtxt::create_and_enter<closure,core::result::Result<core::result::Result<(rustc::session::config::OutputFilenames, rustc_trans::back::write::OngoingCrateTranslation, rustc::dep_graph::graph::DepGraph), rustc::session::CompileIncomplete>, rustc::session::CompileIncomplete>>
             at .\src\librustc\ty\context.rs:1118
  25: rustc_driver::driver::compile_input
             at .\src\librustc_driver\driver.rs:215
  26: rustc_driver::run_compiler
             at .\src\librustc_driver\lib.rs:250

@michaelwoerister

@petrochenkov
Copy link
Contributor

I've seen this as well, it happens with dirty tmp/cfail-tests/incr_comp_with_macro_export and disappears if that directory is purged.

@michaelwoerister
Copy link
Member

Thanks for the bug report! I'll look into it.

@TimNN TimNN added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. labels Oct 8, 2017
kennytm added a commit to kennytm/rust that referenced this issue Oct 10, 2017
…h-macro-export, r=alexcrichton

incr.comp.: Move macro-export test case to src/test/incremental.

`compile-fail/incr_comp_with_macro_export.rs` was trying to role its own incremental compilation setup. This started to cause problems. There's no reason to not just make this a regular `src/test/incremental` test.

Fixes rust-lang#45062.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants