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

compiler stack overflow compiling run-pass/issues/issue-29466.rs and run-pass/issues/issue-36792.rs with debuginfo #58463

Closed
glandium opened this issue Feb 14, 2019 · 2 comments · Fixed by #59446
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@glandium
Copy link
Contributor

With debuginfo-tests set to true in config.toml, running python x.py test src/test/run-pass fails with:

---- [run-pass] run-pass/issues/issue-36792.rs stdout ----

error: test compilation failed although it shouldn't!
status: signal: 6
command: "/mnt/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/mnt/rust/src/test/run-pass/issues/issue-36792.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/mnt/rust/build/x86_64-unknown-linux-gnu/test/run-pass/issues/issue-36792/a" "-Crpath" "-O" "-g" "-Zunstable-options" "-Lnative=/mnt/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/mnt/rust/build/x86_64-unknown-linux-gnu/test/run-pass/issues/issue-36792/auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow

------------------------------------------

thread '[run-pass] run-pass/issues/issue-36792.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
stack backtrace:
   0:     0x5572ef0bc323 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::he5ca7e8a91fc68be
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:     0x5572ef0b7df8 - std::sys_common::backtrace::_print::h60e068884b12931c
                               at src/libstd/sys_common/backtrace.rs:70
   2:     0x5572ef0bae32 - std::panicking::default_hook::{{closure}}::hc983185de2298168
                               at src/libstd/sys_common/backtrace.rs:58
                               at src/libstd/panicking.rs:200
   3:     0x5572ef0bab27 - std::panicking::default_hook::h6b97c91c835a5a90
                               at src/libstd/panicking.rs:209
   4:     0x5572ef0bb540 - std::panicking::rust_panic_with_hook::h96c73571b407939c
                               at src/libstd/panicking.rs:478
   5:     0x5572eefa4284 - std::panicking::begin_panic::hdcb9c5c9848385af
   6:     0x5572eef877d3 - compiletest::runtest::ProcRes::fatal::hd4564792a1dcc8c2
   7:     0x5572eef83072 - compiletest::runtest::TestCx::fatal_proc_rec::h8dada00ad6f542ef
   8:     0x5572eef71d3c - compiletest::runtest::TestCx::check_if_test_should_compile::hbff897c11854a61e
   9:     0x5572eef6ea67 - compiletest::runtest::TestCx::run_revision::he8f5a12ab03f9f49
  10:     0x5572eef67b87 - compiletest::runtest::run::hcf95bec718f18726
  11:     0x5572eefc30ba - <F as alloc::boxed::FnBox<A>>::call_box::h52e5773184df5b88
  12:     0x5572ef080012 - <F as alloc::boxed::FnBox<A>>::call_box::h9444f32827504df2
                               at src/libtest/lib.rs:1468
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/liballoc/boxed.rs:734
  13:     0x5572ef0c4409 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:92
  14:     0x5572ef096d37 - test::run_test::run_test_inner::{{closure}}::hb362655f70a2a56a
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panicking.rs:276
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panic.rs:388
                               at src/libtest/lib.rs:1430
  15:     0x5572ef079004 - std::sys_common::backtrace::__rust_begin_short_backtrace::hdfd30b3004ce04df
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/sys_common/backtrace.rs:135
  16:     0x5572ef0795f4 - std::panicking::try::do_call::h1de50de762eb8517
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/thread/mod.rs:469
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panic.rs:309
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panicking.rs:297
  17:     0x5572ef0c4409 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:92
  18:     0x5572ef07fe1c - <F as alloc::boxed::FnBox<A>>::call_box::h49e936a4ce10b9e3
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panicking.rs:276
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panic.rs:388
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/thread/mod.rs:468
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/liballoc/boxed.rs:734
  19:     0x5572ef0c386d - std::sys::unix::thread::Thread::new::thread_start::h9819c9db0b318724
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/liballoc/boxed.rs:744
                               at src/libstd/sys_common/thread.rs:14
                               at src/libstd/sys/unix/thread.rs:81
  20:     0x7f80b3d026da - start_thread
  21:     0x7f80b381388e - __clone
  22:                0x0 - <unknown>

---- [run-pass] run-pass/issues/issue-29466.rs stdout ----

error: test compilation failed although it shouldn't!
status: signal: 6
command: "/mnt/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/mnt/rust/src/test/run-pass/issues/issue-29466.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/mnt/rust/build/x86_64-unknown-linux-gnu/test/run-pass/issues/issue-29466/a" "-Crpath" "-O" "-g" "-Zunstable-options" "-Lnative=/mnt/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/mnt/rust/build/x86_64-unknown-linux-gnu/test/run-pass/issues/issue-29466/auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------

thread '<unknown>' has overflowed its stack
fatal runtime error: stack overflow

------------------------------------------

thread '[run-pass] run-pass/issues/issue-29466.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
stack backtrace:
   0:     0x5572ef0bc323 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::he5ca7e8a91fc68be
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:     0x5572ef0b7df8 - std::sys_common::backtrace::_print::h60e068884b12931c
                               at src/libstd/sys_common/backtrace.rs:70
   2:     0x5572ef0bae32 - std::panicking::default_hook::{{closure}}::hc983185de2298168
                               at src/libstd/sys_common/backtrace.rs:58
                               at src/libstd/panicking.rs:200
   3:     0x5572ef0bab27 - std::panicking::default_hook::h6b97c91c835a5a90
                               at src/libstd/panicking.rs:209
   4:     0x5572ef0bb540 - std::panicking::rust_panic_with_hook::h96c73571b407939c
                               at src/libstd/panicking.rs:478
   5:     0x5572eefa4284 - std::panicking::begin_panic::hdcb9c5c9848385af
   6:     0x5572eef877d3 - compiletest::runtest::ProcRes::fatal::hd4564792a1dcc8c2
   7:     0x5572eef83072 - compiletest::runtest::TestCx::fatal_proc_rec::h8dada00ad6f542ef
   8:     0x5572eef71d3c - compiletest::runtest::TestCx::check_if_test_should_compile::hbff897c11854a61e
   9:     0x5572eef6ea67 - compiletest::runtest::TestCx::run_revision::he8f5a12ab03f9f49
  10:     0x5572eef67b87 - compiletest::runtest::run::hcf95bec718f18726
  11:     0x5572eefc30ba - <F as alloc::boxed::FnBox<A>>::call_box::h52e5773184df5b88
  12:     0x5572ef080012 - <F as alloc::boxed::FnBox<A>>::call_box::h9444f32827504df2
                               at src/libtest/lib.rs:1468
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/liballoc/boxed.rs:734
  13:     0x5572ef0c4409 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:92
  14:     0x5572ef096d37 - test::run_test::run_test_inner::{{closure}}::hb362655f70a2a56a
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panicking.rs:276
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panic.rs:388
                               at src/libtest/lib.rs:1430
  15:     0x5572ef079004 - std::sys_common::backtrace::__rust_begin_short_backtrace::hdfd30b3004ce04df
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/sys_common/backtrace.rs:135
  16:     0x5572ef0795f4 - std::panicking::try::do_call::h1de50de762eb8517
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/thread/mod.rs:469
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panic.rs:309
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panicking.rs:297
  17:     0x5572ef0c4409 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:92
  18:     0x5572ef07fe1c - <F as alloc::boxed::FnBox<A>>::call_box::h49e936a4ce10b9e3
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panicking.rs:276
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/panic.rs:388
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/libstd/thread/mod.rs:468
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/liballoc/boxed.rs:734
  19:     0x5572ef0c386d - std::sys::unix::thread::Thread::new::thread_start::h9819c9db0b318724
                               at /rustc/d1add97236b64048294692d91fe82b601577dd1f/src/liballoc/boxed.rs:744
                               at src/libstd/sys_common/thread.rs:14
                               at src/libstd/sys/unix/thread.rs:81
  20:     0x7f80b3d026da - start_thread
  21:     0x7f80b381388e - __clone
  22:                0x0 - <unknown>


failures:
    [run-pass] run-pass/issues/issue-29466.rs
    [run-pass] run-pass/issues/issue-36792.rs
@hellow554
Copy link
Contributor

hellow554 commented Feb 14, 2019

https://github.com/rust-lang/rust/blob/master/src/test/run-pass/issues/issue-36792.rs

When compiling it on the playground @ stable:

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
error: Could not compile `playground`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name playground src/main.rs --color never --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 -C metadata=b23403ba4ff45427 -C extra-filename=-b23403ba4ff45427 --out-dir /playground/target/debug/deps -L dependency=/playground/target/debug/deps --extern MacTypes_sys=/playground/target/debug/deps/libMacTypes_sys-8b47d267f511241c.rlib --extern adler32=/playground/target/debug/deps/libadler32-ceb44e3d35d16d2d.rlib --extern aho_corasick=/playground/target/debug/deps/libaho_corasick-38a5478596e9777d.rlib --extern ansi_term=/playground/target/debug/deps/libansi_term-55e4886c2b7feda1.rlib --extern arrayvec=/playground/target/debug/deps/libarrayvec-cfc85d5a47d4bb84.rlib --extern atty=/playground/target/debug/deps/libatty-655413a402920ccb.rlib --extern autocfg=/playground/target/debug/deps/libautocfg-d07dfc74ff78fd15.rlib --extern backtrace=/playground/target/debug/deps/libbacktrace-8d99678e4292d48e.rlib --extern backtrace_sys=/playground/target/debug/deps/libbacktrace_sys-a03f354953a134df.rlib --extern base64=/playground/target/debug/deps/libbase64-37cea6c94eeb790a.rlib --extern bit_set=/playground/target/debug/deps/libbit_set-a616176007567ebe.rlib --extern bit_vec=/playground/target/debug/deps/libbit_vec-afa009d80f61622d.rlib --extern bitflags=/playground/target/debug/deps/libbitflags-3f0e1f175d670494.rlib --extern build_const=/playground/target/debug/deps/libbuild_const-3e81fe8cdbfd26d7.rlib --extern byteorder=/playground/target/debug/deps/libbyteorder-82ee767dccf40fd5.rlib --extern bytes=/playground/target/debug/deps/libbytes-6a3b1990c8464cc5.rlib --extern cc=/playground/target/debug/deps/libcc-837ad796c448a4d7.rlib --extern cfg_if=/playground/target/debug/deps/libcfg_if-35a03e4c10ddea7f.rlib --extern chrono=/playground/target/debug/deps/libchrono-4bae535fd0c6dafd.rlib --extern clap=/playground/target/debug/deps/libclap-9be4f3cbf0cfc418.rlib --extern cloudabi=/playground/target/debug/deps/libcloudabi-a6aacc4eccf49e18.rlib --extern crc=/playground/target/debug/deps/libcrc-2ac40bc2454acb8b.rlib --extern crc32fast=/playground/target/debug/deps/libcrc32fast-511e5f3a78610d8b.rlib --extern crossbeam=/playground/target/debug/deps/libcrossbeam-d516edbc2faf310a.rlib --extern crossbeam_channel=/playground/target/debug/deps/libcrossbeam_channel-2b47644ce14ba44f.rlib --extern crossbeam_deque=/playground/target/debug/deps/libcrossbeam_deque-8c08350bdeef1867.rlib --extern crossbeam_epoch=/playground/target/debug/deps/libcrossbeam_epoch-392100d7691411d9.rlib --extern crossbeam_utils=/playground/target/debug/deps/libcrossbeam_utils-db9ea5a5d374ac80.rlib --extern csv=/playground/target/debug/deps/libcsv-d4eaf713469a941f.rlib --extern csv_core=/playground/target/debug/deps/libcsv_core-0b4055529b5ff325.rlib --extern data_encoding=/playground/target/debug/deps/libdata_encoding-8b34d8b9610e91fa.rlib --extern debug_unreachable=/playground/target/debug/deps/libdebug_unreachable-3fed466a727c8d0a.rlib --extern dtoa=/playground/target/debug/deps/libdtoa-56f03ffc5137257f.rlib --extern either=/playground/target/debug/deps/libeither-b5fbf40611d750c4.rlib --extern encoding_rs=/playground/target/debug/deps/libencoding_rs-8247e21abb761afe.rlib --extern env_logger=/playground/target/debug/deps/libenv_logger-ce491ba5495efc74.rlib --extern error_chain=/playground/target/debug/deps/liberror_chain-ed09acc5dbb12d2e.rlib --extern filetime=/playground/target/debug/deps/libfiletime-1c493426bf4fbc67.rlib --extern fixedbitset=/playground/target/debug/deps/libfixedbitset-8ccf7f2aca0a7a24.rlib --extern flate2=/playground/target/debug/deps/libflate2-40139b2e4c81ea8c.rlib --extern fnv=/playground/target/debug/deps/libfnv-094b34e386dc23e5.rlib --extern foreign_types=/playground/target/debug/deps/libforeign_types-318642db21bcd242.rlib --extern foreign_types_shared=/playground/target/debug/deps/libforeign_types_shared-831ec058a446c1fc.rlib --extern fuchsia_zircon=/playground/target/debug/deps/libfuchsia_zircon-64259c49d7f77a3e.rlib --extern fuchsia_zircon_sys=/playground/target/debug/deps/libfuchsia_zircon_sys-ce084f5d41b4ca99.rlib --extern futf=/playground/target/debug/deps/libfutf-e927774f6981929a.rlib --extern futures=/playground/target/debug/deps/libfutures-10c7f0666944f43c.rlib --extern futures_cpupool=/playground/target/debug/deps/libfutures_cpupool-98516541c430f45c.rlib --extern gcc=/playground/target/debug/deps/libgcc-feda1fbd1952f108.rlib --extern getopts=/playground/target/debug/deps/libgetopts-0b96b6bb8e1ef50d.rlib --extern glob=/playground/target/debug/deps/libglob-b174d7acae03a6c2.rlib --extern h2=/playground/target/debug/deps/libh2-c200aa059694f2b1.rlib --extern html5ever=/playground/target/debug/deps/libhtml5ever-c287f78a4be5994c.rlib --extern http=/playground/target/debug/deps/libhttp-503a6a77032933c5.rlib --extern httparse=/playground/target/debug/deps/libhttparse-3b483d9901df1225.rlib --extern humantime=/playground/target/debug/deps/libhumantime-588bf123cfd39df2.rlib --extern hyper=/playground/target/debug/deps/libhyper-fb78127d30544bdf.rlib --extern hyper_tls=/playground/target/debug/deps/libhyper_tls-64612f0039883cce.rlib --extern idna=/playground/target/debug/deps/libidna-e98b423a699b4fbd.rlib --extern indexmap=/playground/target/debug/deps/libindexmap-f9ef9eefed7f69a5.rlib --extern iovec=/playground/target/debug/deps/libiovec-3ec707b42bc53f93.rlib --extern itertools=/playground/target/debug/deps/libitertools-ae795788f8ca53ee.rlib --extern itoa=/playground/target/debug/deps/libitoa-94cdda41598637d7.rlib --extern kernel32=/playground/target/debug/deps/libkernel32-ce9dec9c548fef37.rlib --extern language_tags=/playground/target/debug/deps/liblanguage_tags-4ae631bba9a9862b.rlib --extern lazy_static=/playground/target/debug/deps/liblazy_static-252e1973615de13b.rlib --extern lazycell=/playground/target/debug/deps/liblazycell-fa8581c5d1da26bf.rlib --extern libc=/playground/target/debug/deps/liblibc-cbc5bea352211688.rlib --extern libflate=/playground/target/debug/deps/liblibflate-7f57b420d0ea161d.rlib --extern lock_api=/playground/target/debug/deps/liblock_api-267ef063c0a658aa.rlib --extern log=/playground/target/debug/deps/liblog-4e673a538adf91b5.rlib --extern mac=/playground/target/debug/deps/libmac-7534cbfb224c8d9a.rlib --extern markup5ever=/playground/target/debug/deps/libmarkup5ever-cc12bcf5918866c8.rlib --extern matches=/playground/target/debug/deps/libmatches-0046d14f96d35511.rlib --extern memchr=/playground/target/debug/deps/libmemchr-86d19b5c90d5a8ef.rlib --extern memmap=/playground/target/debug/deps/libmemmap-ee7cd91cfa8cd51d.rlib --extern memoffset=/playground/target/debug/deps/libmemoffset-d08cb55897081099.rlib --extern mime=/playground/target/debug/deps/libmime-703bfb73860e065c.rlib --extern mime_guess=/playground/target/debug/deps/libmime_guess-f511ead1d93fe60e.rlib --extern miniz_sys=/playground/target/debug/deps/libminiz_sys-55f4cd5239e27e71.rlib --extern miniz_oxide=/playground/target/debug/deps/libminiz_oxide-debf582de16bd261.rlib --extern miniz_oxide_c_api=/playground/target/debug/deps/libminiz_oxide_c_api-fc3b9bff7e220369.rlib --extern mio=/playground/target/debug/deps/libmio-1aabcf550b507164.rlib --extern miow=/playground/target/debug/deps/libmiow-6e288554852cebca.rlib --extern native_tls=/playground/target/debug/deps/libnative_tls-d957095dc44520c7.rlib --extern net2=/playground/target/debug/deps/libnet2-f54a27cab09f051e.rlib --extern debug_unreachable=/playground/target/debug/deps/libdebug_unreachable-b63d91799528bc05.rlib --extern nodrop=/playground/target/debug/deps/libnodrop-e1a326fd845e5526.rlib --extern num=/playground/target/debug/deps/libnum-3dbd947cefba5586.rlib --extern num_bigint=/playground/target/debug/deps/libnum_bigint-0f6e99196fd28410.rlib --extern num_complex=/playground/target/debug/deps/libnum_complex-f53783d84848f85d.rlib --extern num_integer=/playground/target/debug/deps/libnum_integer-8b5142a844291175.rlib --extern num_iter=/playground/target/debug/deps/libnum_iter-d2d08aff83f9ecd7.rlib --extern num_rational=/playground/target/debug/deps/libnum_rational-f7fb01c958819a27.rlib --extern num_traits=/playground/target/debug/deps/libnum_traits-1fd5f6fc89c0e8aa.rlib --extern num_cpus=/playground/target/debug/deps/libnum_cpus-8b3bf4522f319c97.rlib --extern openssl_probe=/playground/target/debug/deps/libopenssl_probe-a7cd65167890729d.rlib --extern ordermap=/playground/target/debug/deps/libordermap-74d4ec9b2a9c1948.rlib --extern owning_ref=/playground/target/debug/deps/libowning_ref-88bfd2348a2f44af.rlib --extern parking_lot=/playground/target/debug/deps/libparking_lot-fb39afa2ce029bcd.rlib --extern parking_lot_core=/playground/target/debug/deps/libparking_lot_core-007a1b5f5124a5de.rlib --extern percent_encoding=/playground/target/debug/deps/libpercent_encoding-2a0344b77de6a853.rlib --extern petgraph=/playground/target/debug/deps/libpetgraph-fd9da9a5610602cb.rlib --extern phf=/playground/target/debug/deps/libphf-cee550f2b480f798.rlib --extern phf_codegen=/playground/target/debug/deps/libphf_codegen-b71b901c4c931409.rlib --extern phf_generator=/playground/target/debug/deps/libphf_generator-2cd4c3985277183f.rlib --extern phf_shared=/playground/target/debug/deps/libphf_shared-35e1cb5ad89a6177.rlib --extern pkg_config=/playground/target/debug/deps/libpkg_config-64200c6dd21f3b20.rlib --extern precomputed_hash=/playground/target/debug/deps/libprecomputed_hash-7f4d3c601e95d3ec.rlib --extern proc_macro2=/playground/target/debug/deps/libproc_macro2-416608e51408652d.rlib --extern quick_error=/playground/target/debug/deps/libquick_error-c31d7d246e55abf0.rlib --extern quote=/playground/target/debug/deps/libquote-822a64196ebeb57f.rlib --extern rand=/playground/target/debug/deps/librand-330cc143ff618300.rlib --extern rand_chacha=/playground/target/debug/deps/librand_chacha-74b7149293b619a6.rlib --extern rand_core=/playground/target/debug/deps/librand_core-ff842916f748ae87.rlib --extern rand_hc=/playground/target/debug/deps/librand_hc-6f1d5b3e1b6e2335.rlib --extern rand_isaac=/playground/target/debug/deps/librand_isaac-ba55db0bac38daf2.rlib --extern rand_os=/playground/target/debug/deps/librand_os-bd0541065d6b98e1.rlib --extern rand_pcg=/playground/target/debug/deps/librand_pcg-1242a15be8f95a37.rlib --extern rand_xorshift=/playground/target/debug/deps/librand_xorshift-e649959808a8dbec.rlib --extern rayon=/playground/target/debug/deps/librayon-5801e69c67e19559.rlib --extern rayon_core=/playground/target/debug/deps/librayon_core-47679896bac4bdf7.rlib --extern rdrand=/playground/target/debug/deps/librdrand-6feac7aa778f6161.rlib --extern regex=/playground/target/debug/deps/libregex-f1a3a902b4d5c898.rlib --extern regex_syntax=/playground/target/debug/deps/libregex_syntax-4c2fd7b6c65dc3cc.rlib --extern remove_dir_all=/playground/target/debug/deps/libremove_dir_all-5d15a1f9ca6ea40e.rlib --extern reqwest=/playground/target/debug/deps/libreqwest-fc093dfe12ee3af2.rlib --extern ring=/playground/target/debug/deps/libring-575792b39264a799.rlib --extern rustc_demangle=/playground/target/debug/deps/librustc_demangle-b8bae1fb1f304279.rlib --extern rustc_serialize=/playground/target/debug/deps/librustc_serialize-7a9b465af1f8ad68.rlib --extern rustc_version=/playground/target/debug/deps/librustc_version-81a857a867bfea3c.rlib --extern ryu=/playground/target/debug/deps/libryu-49402b6630bef172.rlib --extern same_file=/playground/target/debug/deps/libsame_file-8635a8f4178f5a51.rlib --extern schannel=/playground/target/debug/deps/libschannel-a6a9cb422164caed.rlib --extern scopeguard=/playground/target/debug/deps/libscopeguard-88f0712f047cb4fe.rlib --extern select=/playground/target/debug/deps/libselect-cff62638826e5870.rlib --extern semver=/playground/target/debug/deps/libsemver-d02383820a479cb9.rlib --extern semver_parser=/playground/target/debug/deps/libsemver_parser-7eb5aa0cd4dd14dd.rlib --extern serde=/playground/target/debug/deps/libserde-bae9f91aa9902d4e.rlib --extern serde_derive=/playground/target/debug/deps/libserde_derive-81c88963ebbf6d33.so --extern serde_json=/playground/target/debug/deps/libserde_json-d993ae3c0ae66dee.rlib --extern serde_urlencoded=/playground/target/debug/deps/libserde_urlencoded-1cc80378776de183.rlib --extern siphasher=/playground/target/debug/deps/libsiphasher-c3b57abad0dad31e.rlib --extern slab=/playground/target/debug/deps/libslab-8b5cb9cd399b3e33.rlib --extern smallvec=/playground/target/debug/deps/libsmallvec-5d36c0308ce527d6.rlib --extern stable_deref_trait=/playground/target/debug/deps/libstable_deref_trait-8ff832b068f358b4.rlib --extern string=/playground/target/debug/deps/libstring-674527171f8141de.rlib --extern string_cache=/playground/target/debug/deps/libstring_cache-d6c7660b6937bfff.rlib --extern string_cache_codegen=/playground/target/debug/deps/libstring_cache_codegen-44bd813dce1db95b.rlib --extern string_cache_shared=/playground/target/debug/deps/libstring_cache_shared-19f08e76cba719cf.rlib --extern strsim=/playground/target/debug/deps/libstrsim-f331ce7ad4c1ee8d.rlib --extern syn=/playground/target/debug/deps/libsyn-a15c934e3649041d.rlib --extern synom=/playground/target/debug/deps/libsynom-0b36e9194e062142.rlib --extern syslog=/playground/target/debug/deps/libsyslog-798236dbeb2b8927.rlib --extern tar=/playground/target/debug/deps/libtar-b6f194787ece962c.rlib --extern tempdir=/playground/target/debug/deps/libtempdir-2fba683ae227feec.rlib --extern tempfile=/playground/target/debug/deps/libtempfile-878eb4a49eb17391.rlib --extern tendril=/playground/target/debug/deps/libtendril-0d8d090f345d49be.rlib --extern term=/playground/target/debug/deps/libterm-427352e9017d8ae6.rlib --extern termcolor=/playground/target/debug/deps/libtermcolor-c9f850d6f351a198.rlib --extern termion=/playground/target/debug/deps/libtermion-745f53f3c2013ba3.rlib --extern textwrap=/playground/target/debug/deps/libtextwrap-1481066367f47273.rlib --extern thread_id=/playground/target/debug/deps/libthread_id-33dbbbab141cac81.rlib --extern thread_local=/playground/target/debug/deps/libthread_local-04141a4194d3b0ef.rlib --extern threadpool=/playground/target/debug/deps/libthreadpool-1498e0a87279aeb0.rlib --extern time=/playground/target/debug/deps/libtime-e00910ae7037af66.rlib --extern tokio=/playground/target/debug/deps/libtokio-a3580dfc33d3046d.rlib --extern tokio_current_thread=/playground/target/debug/deps/libtokio_current_thread-ceb16c2cfa832f46.rlib --extern tokio_executor=/playground/target/debug/deps/libtokio_executor-b252517fe132feae.rlib --extern tokio_io=/playground/target/debug/deps/libtokio_io-e35d300791197b20.rlib --extern tokio_reactor=/playground/target/debug/deps/libtokio_reactor-728bb7eebdd19ec3.rlib --extern tokio_tcp=/playground/target/debug/deps/libtokio_tcp-9041758550ff8b0b.rlib --extern tokio_threadpool=/playground/target/debug/deps/libtokio_threadpool-30e146551aecbaa3.rlib --extern tokio_timer=/playground/target/debug/deps/libtokio_timer-cc20610e088c7c02.rlib --extern toml=/playground/target/debug/deps/libtoml-83c3c151a2ae03a8.rlib --extern traitobject=/playground/target/debug/deps/libtraitobject-764ee0442155d49b.rlib --extern try_lock=/playground/target/debug/deps/libtry_lock-817bd05bfba13acd.rlib --extern ucd_util=/playground/target/debug/deps/libucd_util-f87d823046864416.rlib --extern unicase=/playground/target/debug/deps/libunicase-d14b699d2387579a.rlib --extern unicode_bidi=/playground/target/debug/deps/libunicode_bidi-b295d28e27c68e39.rlib --extern unicode_normalization=/playground/target/debug/deps/libunicode_normalization-e3d20650299cd48a.rlib --extern unicode_width=/playground/target/debug/deps/libunicode_width-03d1d5390c1987f2.rlib --extern unicode_xid=/playground/target/debug/deps/libunicode_xid-7a773b7760e7371c.rlib --extern unreachable=/playground/target/debug/deps/libunreachable-551db380c5880cce.rlib --extern untrusted=/playground/target/debug/deps/libuntrusted-2e867ad178eafaad.rlib --extern url=/playground/target/debug/deps/liburl-a009f586948b25ae.rlib --extern utf8=/playground/target/debug/deps/libutf8-dcdfbf2fe06fdb2b.rlib --extern utf8_ranges=/playground/target/debug/deps/libutf8_ranges-d732ea640f908c1b.rlib --extern uuid=/playground/target/debug/deps/libuuid-290c0c6c3c67929c.rlib --extern vcpkg=/playground/target/debug/deps/libvcpkg-cef76c133595a82a.rlib --extern vec_map=/playground/target/debug/deps/libvec_map-2f6830181d75d2a3.rlib --extern version_check=/playground/target/debug/deps/libversion_check-6f6fe9aa3e6da8f2.rlib --extern void=/playground/target/debug/deps/libvoid-52d3883be30add66.rlib --extern walkdir=/playground/target/debug/deps/libwalkdir-4d7273f4f6f55e46.rlib --extern want=/playground/target/debug/deps/libwant-107b44baad1e9b44.rlib --extern winapi=/playground/target/debug/deps/libwinapi-fbb72cd28c610788.rlib --extern build=/playground/target/debug/deps/libbuild-ea5a55cbae78bb57.rlib --extern winapi_i686_pc_windows_gnu=/playground/target/debug/deps/libwinapi_i686_pc_windows_gnu-4c036b6e89aec5a4.rlib --extern winapi_util=/playground/target/debug/deps/libwinapi_util-d9b77ee7c687daea.rlib --extern winapi_x86_64_pc_windows_gnu=/playground/target/debug/deps/libwinapi_x86_64_pc_windows_gnu-db4dad4cfbc199ca.rlib --extern wincolor=/playground/target/debug/deps/libwincolor-2ae2cd5de42f1593.rlib --extern ws2_32=/playground/target/debug/deps/libws2_32-8206ddf84d5a5298.rlib --extern xattr=/playground/target/debug/deps/libxattr-9ab822f1e0135092.rlib -L native=/playground/target/debug/build/backtrace-sys-fa3b406e0195e223/out -L native=/playground/target/debug/build/miniz-sys-da9a03e6a74524d5/out -L native=/playground/target/debug/build/ring-2f45e5290d6e2555/out` (signal: 6, SIGABRT: process abort signal)

@hellow554
Copy link
Contributor

hellow554 commented Feb 14, 2019

Interesting enough #36792 and #47344 never fixed that? Well, it doesn't ICE anymore, but I would like to see a proper error message
😕 nightly-2018-01-14 doen't compile and exit on a SIGSEGV:

op@VBOX ~> rustc --version
rustc 1.25.0-nightly (e6072a7b3 2018-01-13)
op@VBOX ~> cargo build --verbose
   Compiling foo v0.1.0 (file:///tmp/tmp.ZxxWikB5JA/foo)
     Running `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=76c06508f005ca4a -C extra-filename=-76c06508f005ca4a --out-dir /tmp/tmp.ZxxWikB5JA/foo/target/debug/deps -C incremental=/tmp/tmp.ZxxWikB5JA/foo/target/debug/incremental -L dependency=/tmp/tmp.ZxxWikB5JA/foo/target/debug/deps`
error: Could not compile `foo`.

Caused by:
  process didn't exit successfully: `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=76c06508f005ca4a -C extra-filename=-76c06508f005ca4a --out-dir /tmp/tmp.ZxxWikB5JA/foo/target/debug/deps -C incremental=/tmp/tmp.ZxxWikB5JA/foo/target/debug/incremental -L dependency=/tmp/tmp.ZxxWikB5JA/foo/target/debug/deps` (signal: 11, SIGSEGV: invalid memory reference)

cc @topecongiro because you dealt with that bug earlier on.

@jonas-schievink jonas-schievink added I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 14, 2019
Aaron1011 added a commit to Aaron1011/rust that referenced this issue Mar 26, 2019
By using 'impl trait', it's possible to create a self-referential
type as follows:

fn foo() -> impl Copy { foo }

This is a function which returns itself.
Normally, the signature of this function would be impossible
to write - it would look like 'fn foo() -> fn() -> fn() ...'
e.g. a function which returns a function, which returns a function...

Using 'impl trait' allows us to avoid writing this infinitely long
type. While it's useless for practical purposes, it does compile and run

However, issues arise when we try to generate llvm debuginfo for such a
type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
generate debuginfo, which can lead to us recursing back to the original
'fn' type when we try to process its return type.

To resolve this, I've modified debuginfo generation to account for these
kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
we can generate - 'impl trait' does not exist in debuginfo, and this
kind of recursive type is impossible to directly represent.

To ensure that we emit *something*, this commit emits dummy
debuginfo/type names whenever it encounters a self-reference. In
practice, this should never happen - it's just to ensure that we can
emit some kind of debuginfo, even if it's not particularly meaningful

Fixes rust-lang#58463
Centril added a commit to Centril/rust that referenced this issue Mar 29, 2019
…=oli-obk

Fix stack overflow when generating debuginfo for 'recursive' type

By using 'impl trait', it's possible to create a self-referential
type as follows:

fn foo() -> impl Copy { foo }

This is a function which returns itself.
Normally, the signature of this function would be impossible
to write - it would look like 'fn foo() -> fn() -> fn() ...'
e.g. a function which returns a function, which returns a function...

Using 'impl trait' allows us to avoid writing this infinitely long
type. While it's useless for practical purposes, it does compile and run

However, issues arise when we try to generate llvm debuginfo for such a
type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
generate debuginfo, which can lead to us recursing back to the original
'fn' type when we try to process its return type.

To resolve this, I've modified debuginfo generation to account for these
kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
we can generate - 'impl trait' does not exist in debuginfo, and this
kind of recursive type is impossible to directly represent.

To ensure that we emit *something*, this commit emits dummy
debuginfo/type names whenever it encounters a self-reference. In
practice, this should never happen - it's just to ensure that we can
emit some kind of debuginfo, even if it's not particularly meaningful

Fixes rust-lang#58463
Aaron1011 added a commit to Aaron1011/rust that referenced this issue Apr 1, 2019
By using 'impl trait', it's possible to create a self-referential
type as follows:

fn foo() -> impl Copy { foo }

This is a function which returns itself.
Normally, the signature of this function would be impossible
to write - it would look like 'fn foo() -> fn() -> fn() ...'
e.g. a function which returns a function, which returns a function...

Using 'impl trait' allows us to avoid writing this infinitely long
type. While it's useless for practical purposes, it does compile and run

However, issues arise when we try to generate llvm debuginfo for such a
type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
generate debuginfo, which can lead to us recursing back to the original
'fn' type when we try to process its return type.

To resolve this, I've modified debuginfo generation to account for these
kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
we can generate - 'impl trait' does not exist in debuginfo, and this
kind of recursive type is impossible to directly represent.

To ensure that we emit *something*, this commit emits dummy
debuginfo/type names whenever it encounters a self-reference. In
practice, this should never happen - it's just to ensure that we can
emit some kind of debuginfo, even if it's not particularly meaningful

Fixes rust-lang#58463
Centril added a commit to Centril/rust that referenced this issue Apr 2, 2019
…=oli-obk

Fix stack overflow when generating debuginfo for 'recursive' type

By using 'impl trait', it's possible to create a self-referential
type as follows:

fn foo() -> impl Copy { foo }

This is a function which returns itself.
Normally, the signature of this function would be impossible
to write - it would look like 'fn foo() -> fn() -> fn() ...'
e.g. a function which returns a function, which returns a function...

Using 'impl trait' allows us to avoid writing this infinitely long
type. While it's useless for practical purposes, it does compile and run

However, issues arise when we try to generate llvm debuginfo for such a
type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
generate debuginfo, which can lead to us recursing back to the original
'fn' type when we try to process its return type.

To resolve this, I've modified debuginfo generation to account for these
kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
we can generate - 'impl trait' does not exist in debuginfo, and this
kind of recursive type is impossible to directly represent.

To ensure that we emit *something*, this commit emits dummy
debuginfo/type names whenever it encounters a self-reference. In
practice, this should never happen - it's just to ensure that we can
emit some kind of debuginfo, even if it's not particularly meaningful

Fixes rust-lang#58463
Centril added a commit to Centril/rust that referenced this issue Apr 2, 2019
…=oli-obk

Fix stack overflow when generating debuginfo for 'recursive' type

By using 'impl trait', it's possible to create a self-referential
type as follows:

fn foo() -> impl Copy { foo }

This is a function which returns itself.
Normally, the signature of this function would be impossible
to write - it would look like 'fn foo() -> fn() -> fn() ...'
e.g. a function which returns a function, which returns a function...

Using 'impl trait' allows us to avoid writing this infinitely long
type. While it's useless for practical purposes, it does compile and run

However, issues arise when we try to generate llvm debuginfo for such a
type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
generate debuginfo, which can lead to us recursing back to the original
'fn' type when we try to process its return type.

To resolve this, I've modified debuginfo generation to account for these
kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
we can generate - 'impl trait' does not exist in debuginfo, and this
kind of recursive type is impossible to directly represent.

To ensure that we emit *something*, this commit emits dummy
debuginfo/type names whenever it encounters a self-reference. In
practice, this should never happen - it's just to ensure that we can
emit some kind of debuginfo, even if it's not particularly meaningful

Fixes rust-lang#58463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants