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

TAIT: ICE (stack overflow) on recursive TAIT static #117412

Closed
Nadrieril opened this issue Oct 30, 2023 · 2 comments · Fixed by #117414
Closed

TAIT: ICE (stack overflow) on recursive TAIT static #117412

Nadrieril opened this issue Oct 30, 2023 · 2 comments · Fixed by #117414
Assignees
Labels
C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` 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

@Nadrieril
Copy link
Member

This triggers a stack overflow of rustc (even without the TAIT feature gate, i.e. on stable too) (playgound):

type T = impl Copy;
static STATIC: T = None::<&'static T>;
Backtrace

  Compiling playground v0.0.1 (/playground)
error[E0658]: `impl Trait` in type aliases is unstable
 --> src/lib.rs:1:10
  |
1 | type T = impl Copy;
  |          ^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0720]: cannot resolve opaque type
 --> src/lib.rs:1:10
  |
1 | type T = impl Copy;
  |          ^^^^^^^^^ cannot resolve opaque type

error: rustc interrupted by SIGSEGV, printing backtrace

/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(+0x2aefce6)[0x7ff2731bace6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7ff27053e420]
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(_RNvXs0_NtNtNtCsecErmRfZhzL_21rustc_trait_selection6traits5query9normalizeNtB5_15QueryNormalizerINtNtCs1FCsZ7FJ6OF_13rustc_type_ir4fold18FallibleTypeFolderNtNtNtCsgn7FIBZge8T_12rustc_middle2ty7context6TyCtxtE11try_fold_ty+0xfa)[0x7ff2720b671a]

### cycle encountered after 3 frames with period 6
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(_RNvXs0_NtNtNtCsecErmRfZhzL_21rustc_trait_selection6traits5query9normalizeNtB5_15QueryNormalizerINtNtCs1FCsZ7FJ6OF_13rustc_type_ir4fold18FallibleTypeFolderNtNtNtCsgn7FIBZge8T_12rustc_middle2ty7context6TyCtxtE11try_fold_ty+0xd2c)[0x7ff2720b734c]
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(+0x4151e92)[0x7ff27481ce92]
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(_RNvXs0_NtNtNtCsecErmRfZhzL_21rustc_trait_selection6traits5query9normalizeNtB5_15QueryNormalizerINtNtCs1FCsZ7FJ6OF_13rustc_type_ir4fold18FallibleTypeFolderNtNtNtCsgn7FIBZge8T_12rustc_middle2ty7context6TyCtxtE11try_fold_ty+0x6ed)[0x7ff2720b6d0d]
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(_RNvXs0_NtNtNtCsecErmRfZhzL_21rustc_trait_selection6traits5query9normalizeNtB5_15QueryNormalizerINtNtCs1FCsZ7FJ6OF_13rustc_type_ir4fold18FallibleTypeFolderNtNtNtCsgn7FIBZge8T_12rustc_middle2ty7context6TyCtxtE11try_fold_ty+0xd2c)[0x7ff2720b734c]
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(+0x4151e92)[0x7ff27481ce92]
/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(_RNvXs0_NtNtNtCsecErmRfZhzL_21rustc_trait_selection6traits5query9normalizeNtB5_15QueryNormalizerINtNtCs1FCsZ7FJ6OF_13rustc_type_ir4fold18FallibleTypeFolderNtNtNtCsgn7FIBZge8T_12rustc_middle2ty7context6TyCtxtE11try_fold_ty+0x6ed)[0x7ff2720b6d0d]
### recursed 42 times

/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-bc0e92f1fcade314.so(_RNvXs0_NtNtNtCsecErmRfZhzL_21rustc_trait_selection6traits5query9normalizeNtB5_15QueryNormalizerINtNtCs1FCsZ7FJ6OF_13rustc_type_ir4fold18FallibleTypeFolderNtNtNtCsgn7FIBZge8T_12rustc_middle2ty7context6TyCtxtE11try_fold_ty+0xd2c)[0x7ff2720b734c]

note: rustc unexpectedly overflowed its stack! this is a bug
note: maximum backtrace depth reached, frames may have been lost
note: we would appreciate a report at https://github.com/rust-lang/rust
error: could not compile `playground` (lib) due to 2 previous errors

Caused by:
  process didn't exit successfully: `/playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name playground --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C metadata=726601cb41828b6f -C extra-filename=-726601cb41828b6f --out-dir /playground/target/debug/deps -L dependency=/playground/target/debug/deps --extern addr2line=/playground/target/debug/deps/libaddr2line-2bece9cba6ef3711.rmeta --extern adler=/playground/target/debug/deps/libadler-4b8fd5129cfff852.rmeta --extern ahash=/playground/target/debug/deps/libahash-5cf99516da079710.rmeta --extern aho_corasick=/playground/target/debug/deps/libaho_corasick-99ceab6a7bb29ce1.rmeta --extern allocator_api2=/playground/target/debug/deps/liballocator_api2-7d05990ff544e806.rmeta --extern ansi_term=/playground/target/debug/deps/libansi_term-04c9b33f73e1a189.rmeta --extern anstream=/playground/target/debug/deps/libanstream-62efcdd402a073dd.rmeta --extern anstyle=/playground/target/debug/deps/libanstyle-8f8d4fea28f2a1d5.rmeta --extern anstyle_parse=/playground/target/debug/deps/libanstyle_parse-4a7220c9d2a5b29d.rmeta --extern anstyle_query=/playground/target/debug/deps/libanstyle_query-96504d9d99497480.rmeta --extern anyhow=/playground/target/debug/deps/libanyhow-15ec6d91642421d1.rmeta --extern approx=/playground/target/debug/deps/libapprox-53e70a8a7a0605f9.rmeta --extern arc_swap=/playground/target/debug/deps/libarc_swap-83237bc53c414e7f.rmeta --extern async_recursion=/playground/target/debug/deps/libasync_recursion-2e4eebb0654e0dfd.so --extern async_trait=/playground/target/debug/deps/libasync_trait-72cdcb149ca40c96.so --extern atomic=/playground/target/debug/deps/libatomic-66a22cd5662e9a9e.rmeta --extern atty=/playground/target/debug/deps/libatty-89ca53c2f7444a0f.rmeta --extern autocfg=/playground/target/debug/deps/libautocfg-3d450d9074e07f59.rmeta --extern backtrace=/playground/target/debug/deps/libbacktrace-c51c99e89b6b2441.rmeta --extern base64=/playground/target/debug/deps/libbase64-d2f713111ac6eb6a.rmeta --extern bit_set=/playground/target/debug/deps/libbit_set-f1e7bda0169cdee6.rmeta --extern bit_vec=/playground/target/debug/deps/libbit_vec-77f50bbb39a59357.rmeta --extern bit_field=/playground/target/debug/deps/libbit_field-b8fea706365d4813.rmeta --extern bitflags_1_3_2=/playground/target/debug/deps/libbitflags-5a958198ada4fb16.rmeta --extern bitflags=/playground/target/debug/deps/libbitflags-079cfad00e492741.rmeta --extern block_buffer=/playground/target/debug/deps/libblock_buffer-64d138d916be5818.rmeta --extern bytemuck=/playground/target/debug/deps/libbytemuck-f361a66cbf8265aa.rmeta --extern bytemuck_derive=/playground/target/debug/deps/libbytemuck_derive-7d44a53549767832.so --extern byteorder=/playground/target/debug/deps/libbyteorder-ea94e0aedcc7c629.rmeta --extern bytes_0_4_12=/playground/target/debug/deps/libbytes-9ef4b4c6c5d78033.rmeta --extern bytes=/playground/target/debug/deps/libbytes-2af4f0533177d5e6.rmeta --extern cc=/playground/target/debug/deps/libcc-8640d4481605bf38.rmeta --extern cfg_if=/playground/target/debug/deps/libcfg_if-a13915cce13fe9ca.rmeta --extern chrono=/playground/target/debug/deps/libchrono-cae65a422f691ccc.rmeta --extern clap=/playground/target/debug/deps/libclap-9accef166c268167.rmeta --extern clap_builder=/playground/target/debug/deps/libclap_builder-373c0c2789d1ec01.rmeta --extern clap_derive=/playground/target/debug/deps/libclap_derive-6eb03a213fd000e7.so --extern clap_lex=/playground/target/debug/deps/libclap_lex-ab13d608105cf508.rmeta --extern color_quant=/playground/target/debug/deps/libcolor_quant-1e3d8251a0cfbe83.rmeta --extern colorchoice=/playground/target/debug/deps/libcolorchoice-d85a47f8043f29cb.rmeta --extern const_default=/playground/target/debug/deps/libconst_default-1a6bd097063af8be.rmeta --extern cookie=/playground/target/debug/deps/libcookie-2a8fe86d1435deb6.rmeta --extern cookie_store=/playground/target/debug/deps/libcookie_store-66fb2ea659fce9ca.rmeta --extern cpufeatures=/playground/target/debug/deps/libcpufeatures-16aebbd2b03f4641.rmeta --extern crc32fast=/playground/target/debug/deps/libcrc32fast-16665c10727907d6.rmeta --extern crossbeam=/playground/target/debug/deps/libcrossbeam-6877d1d99982cfea.rmeta --extern crossbeam_channel=/playground/target/debug/deps/libcrossbeam_channel-43b451289c60897b.rmeta --extern crossbeam_deque=/playground/target/debug/deps/libcrossbeam_deque-fd923f9f3f79b8ee.rmeta --extern crossbeam_epoch=/playground/target/debug/deps/libcrossbeam_epoch-7d9667ce8348a877.rmeta --extern crossbeam_queue=/playground/target/debug/deps/libcrossbeam_queue-4670823e906cced8.rmeta --extern crossbeam_utils=/playground/target/debug/deps/libcrossbeam_utils-ee754b1f69c0dc54.rmeta --extern crypto_common=/playground/target/debug/deps/libcrypto_common-432a40e13c3c1ece.rmeta --extern csv=/playground/target/debug/deps/libcsv-4d081e1f0250d6d6.rmeta --extern csv_core=/playground/target/debug/deps/libcsv_core-8b8b0d66418f14a8.rmeta --extern data_encoding=/playground/target/debug/deps/libdata_encoding-1da97176ef694edd.rmeta --extern deranged=/playground/target/debug/deps/libderanged-0a7b82a7cc01a021.rmeta --extern derivative=/playground/target/debug/deps/libderivative-76cc65638c664d4c.so --extern destructure_traitobject=/playground/target/debug/deps/libdestructure_traitobject-87e77274e0761883.rmeta --extern digest=/playground/target/debug/deps/libdigest-d3e7be0fa0629ad4.rmeta --extern either=/playground/target/debug/deps/libeither-d74a95daf708410c.rmeta --extern encoding_rs=/playground/target/debug/deps/libencoding_rs-e6621a19cbb273ce.rmeta --extern env_logger=/playground/target/debug/deps/libenv_logger-8c34ca822bd99ee8.rmeta --extern equivalent=/playground/target/debug/deps/libequivalent-6cc7ae9e38a15ffc.rmeta --extern errno=/playground/target/debug/deps/liberrno-4c88d8c076b210a1.rmeta --extern error_chain=/playground/target/debug/deps/liberror_chain-9c40e2459596673b.rmeta --extern exr=/playground/target/debug/deps/libexr-fa2dc5312f4da7ba.rmeta --extern fallible_iterator=/playground/target/debug/deps/libfallible_iterator-7a471d2457799014.rmeta --extern fallible_streaming_iterator=/playground/target/debug/deps/libfallible_streaming_iterator-19f82d9ed1e69d6f.rmeta --extern faster_hex=/playground/target/debug/deps/libfaster_hex-0054e0dc9efc6a0a.rmeta --extern fastrand=/playground/target/debug/deps/libfastrand-2bd0ac5c1568aac6.rmeta --extern fdeflate=/playground/target/debug/deps/libfdeflate-428db6530bd525fb.rmeta --extern filetime=/playground/target/debug/deps/libfiletime-86d42a817612f949.rmeta --extern finl_unicode=/playground/target/debug/deps/libfinl_unicode-5db8770b61cdc163.rmeta --extern fixedbitset=/playground/target/debug/deps/libfixedbitset-d41ae8cca7fbfa8d.rmeta --extern flate2=/playground/target/debug/deps/libflate2-6cd017464a97d3b3.rmeta --extern flume=/playground/target/debug/deps/libflume-2c1ab844fff5025b.rmeta --extern fnv=/playground/target/debug/deps/libfnv-6dccac16e49fa145.rmeta --extern foreign_types=/playground/target/debug/deps/libforeign_types-390e2438c59f5ba2.rmeta --extern foreign_types_shared=/playground/target/debug/deps/libforeign_types_shared-97c18a0cb4469889.rmeta --extern form_urlencoded=/playground/target/debug/deps/libform_urlencoded-aa4824cf7b585f3b.rmeta --extern futf=/playground/target/debug/deps/libfutf-2a83b995d1f1e9ef.rmeta --extern futures_0_1_31=/playground/target/debug/deps/libfutures-93c287bdc623b6e7.rmeta --extern futures=/playground/target/debug/deps/libfutures-5b5fa57900be2f9e.rmeta --extern futures_channel=/playground/target/debug/deps/libfutures_channel-4fcfe75a5a558e63.rmeta --extern futures_core=/playground/target/debug/deps/libfutures_core-b287ef7ee52e52ec.rmeta --extern futures_executor=/playground/target/debug/deps/libfutures_executor-7b61d62d9b3f3858.rmeta --extern futures_io=/playground/target/debug/deps/libfutures_io-4ae65f077a901470.rmeta --extern futures_macro=/playground/target/debug/deps/libfutures_macro-1b1a4dbab6cb93d8.so --extern futures_sink=/playground/target/debug/deps/libfutures_sink-33c098844c503648.rmeta --extern futures_task=/playground/target/debug/deps/libfutures_task-e7f20bceb2daafaf.rmeta --extern futures_util=/playground/target/debug/deps/libfutures_util-bd6dcfa673e5bdda.rmeta --extern generic_array_0_14_7=/playground/target/debug/deps/libgeneric_array-2d9f764b3543150b.rmeta --extern generic_array=/playground/target/debug/deps/libgeneric_array-012a0900ddd17a4d.rmeta --extern getrandom=/playground/target/debug/deps/libgetrandom-c211ae36a1b75ea4.rmeta --extern gif=/playground/target/debug/deps/libgif-a3ff39032fb67e9c.rmeta --extern gimli=/playground/target/debug/deps/libgimli-5e62d733e6b28582.rmeta --extern glob=/playground/target/debug/deps/libglob-4a1906707ec3d0c1.rmeta --extern h2=/playground/target/debug/deps/libh2-3b9b240c56437e71.rmeta --extern half=/playground/target/debug/deps/libhalf-ac13adfbcf9659b7.rmeta --extern hashbrown_0_12_3=/playground/target/debug/deps/libhashbrown-8fe2fca2083c00a4.rmeta --extern hashbrown=/playground/target/debug/deps/libhashbrown-75484cc187662563.rmeta --extern hashlink=/playground/target/debug/deps/libhashlink-e58003792f823741.rmeta --extern heck=/playground/target/debug/deps/libheck-cfbb2f213904e42a.rmeta --extern hmac=/playground/target/debug/deps/libhmac-3f76e06f7fd57eb7.rmeta --extern html5ever=/playground/target/debug/deps/libhtml5ever-a219358d36e17787.rmeta --extern http=/playground/target/debug/deps/libhttp-2f07f63477e65eb2.rmeta --extern http_body=/playground/target/debug/deps/libhttp_body-e9a1f2a54a526585.rmeta --extern httparse=/playground/target/debug/deps/libhttparse-06353f6a86307992.rmeta --extern httpdate=/playground/target/debug/deps/libhttpdate-7086f9f89943acb6.rmeta --extern humantime=/playground/target/debug/deps/libhumantime-f1893920e1a201c5.rmeta --extern hyper=/playground/target/debug/deps/libhyper-a0c8fcd8f1f2fbbd.rmeta --extern hyper_tls=/playground/target/debug/deps/libhyper_tls-2fea23989aa3b711.rmeta --extern iana_time_zone=/playground/target/debug/deps/libiana_time_zone-8514cf723f74c316.rmeta --extern idna_0_2_3=/playground/target/debug/deps/libidna-d3fbadbb79c511b5.rmeta --extern idna_0_3_0=/playground/target/debug/deps/libidna-e4f566b65851a16f.rmeta --extern idna=/playground/target/debug/deps/libidna-58de6648e4f04566.rmeta --extern image=/playground/target/debug/deps/libimage-ac9de376378ac6d6.rmeta --extern indexmap_1_9_3=/playground/target/debug/deps/libindexmap-1a5cb7fce189052d.rmeta --extern indexmap=/playground/target/debug/deps/libindexmap-30450d3885a9f499.rmeta --extern iovec=/playground/target/debug/deps/libiovec-b75deb07305fa8a3.rmeta --extern ipnet=/playground/target/debug/deps/libipnet-d3f59b7449d67d0c.rmeta --extern is_terminal=/playground/target/debug/deps/libis_terminal-a72c3751ff3899b4.rmeta --extern itertools=/playground/target/debug/deps/libitertools-9f270a0313070569.rmeta --extern itoa=/playground/target/debug/deps/libitoa-97f67c8f1714d958.rmeta --extern jpeg_decoder=/playground/target/debug/deps/libjpeg_decoder-3c0bee5fb3068c88.rmeta --extern lazy_static=/playground/target/debug/deps/liblazy_static-f0d1fe2c7d2f65c1.rmeta --extern lebe=/playground/target/debug/deps/liblebe-df536f29a253ae0a.rmeta --extern libc=/playground/target/debug/deps/liblibc-2ad57da7d7fe4112.rmeta --extern libm=/playground/target/debug/deps/liblibm-c99d4c8de82af98a.rmeta --extern libsqlite3_sys=/playground/target/debug/deps/liblibsqlite3_sys-fca2ee336a84582e.rmeta --extern linked_hash_map=/playground/target/debug/deps/liblinked_hash_map-43c476d245d17030.rmeta --extern linux_raw_sys=/playground/target/debug/deps/liblinux_raw_sys-4680afb9db85d269.rmeta --extern lock_api=/playground/target/debug/deps/liblock_api-6ee6280995ae18ec.rmeta --extern log=/playground/target/debug/deps/liblog-a220cc2c2dc19e6b.rmeta --extern log_mdc=/playground/target/debug/deps/liblog_mdc-b2e522dfe6457aff.rmeta --extern log4rs=/playground/target/debug/deps/liblog4rs-2562903351439270.rmeta --extern mac=/playground/target/debug/deps/libmac-d89926eef8b40c52.rmeta --extern markup5ever=/playground/target/debug/deps/libmarkup5ever-9a55aa67eb772ec1.rmeta --extern markup5ever_rcdom=/playground/target/debug/deps/libmarkup5ever_rcdom-7b4dc6b17ce2ae46.rmeta --extern matches=/playground/target/debug/deps/libmatches-efbfe2d9a1ec03f7.rmeta --extern matrixmultiply=/playground/target/debug/deps/libmatrixmultiply-c8ba0641fe3b60c2.rmeta --extern md5=/playground/target/debug/deps/libmd5-178db5e706b0096b.rmeta --extern memchr=/playground/target/debug/deps/libmemchr-9e6a266aac9a16aa.rmeta --extern memmap=/playground/target/debug/deps/libmemmap-b4df4b31e62e4c4b.rmeta --extern memoffset=/playground/target/debug/deps/libmemoffset-21370145175590e7.rmeta --extern mime=/playground/target/debug/deps/libmime-375c0418c8765671.rmeta --extern mime_guess=/playground/target/debug/deps/libmime_guess-e75d24c81627564a.rmeta --extern minimal_lexical=/playground/target/debug/deps/libminimal_lexical-a83db813d9cb9018.rmeta --extern miniz_oxide=/playground/target/debug/deps/libminiz_oxide-46039e4beb5a9b07.rmeta --extern mio=/playground/target/debug/deps/libmio-27591a1352513757.rmeta --extern nalgebra=/playground/target/debug/deps/libnalgebra-ceed30db68837ba7.rmeta --extern nalgebra_macros=/playground/target/debug/deps/libnalgebra_macros-473fdd3365ea0e51.so --extern native_tls=/playground/target/debug/deps/libnative_tls-b144b8f61539b9ed.rmeta --extern ndarray=/playground/target/debug/deps/libndarray-2f3a367cb613de1c.rmeta --extern debug_unreachable=/playground/target/debug/deps/libdebug_unreachable-6fb3a070e178fe39.rmeta --extern nom=/playground/target/debug/deps/libnom-0f96cf3120451c3b.rmeta --extern num=/playground/target/debug/deps/libnum-bd848b56477f2268.rmeta --extern num_bigint=/playground/target/debug/deps/libnum_bigint-a9202eebca17a358.rmeta --extern num_complex=/playground/target/debug/deps/libnum_complex-b742c81ea8c8aaa0.rmeta --extern num_integer=/playground/target/debug/deps/libnum_integer-bbcae8419fdb1956.rmeta --extern num_iter=/playground/target/debug/deps/libnum_iter-01cceb15fe42b27f.rmeta --extern num_rational=/playground/target/debug/deps/libnum_rational-c7ffb1739525b637.rmeta --extern num_traits=/playground/target/debug/deps/libnum_traits-b37c5d56922794dc.rmeta --extern num_cpus=/playground/target/debug/deps/libnum_cpus-4a6f727f891e7a37.rmeta --extern object=/playground/target/debug/deps/libobject-1909a9290fdfc532.rmeta --extern once_cell=/playground/target/debug/deps/libonce_cell-4d96680ec47bfa9c.rmeta --extern openssl=/playground/target/debug/deps/libopenssl-ccb7a5779f0ca141.rmeta --extern openssl_macros=/playground/target/debug/deps/libopenssl_macros-6fc1af0f86459a49.so --extern openssl_probe=/playground/target/debug/deps/libopenssl_probe-e8998be82f80d555.rmeta --extern openssl_sys=/playground/target/debug/deps/libopenssl_sys-388b7696b9039260.rmeta --extern ordered_float=/playground/target/debug/deps/libordered_float-9904bb8ff9cd80c4.rmeta --extern parking_lot=/playground/target/debug/deps/libparking_lot-7d91f72f42bdf2fd.rmeta --extern parking_lot_core=/playground/target/debug/deps/libparking_lot_core-c7aae23e4a0c25ae.rmeta --extern paste=/playground/target/debug/deps/libpaste-371e64c5e3468dd7.so --extern percent_encoding=/playground/target/debug/deps/libpercent_encoding-1a163d421c8445cb.rmeta --extern petgraph=/playground/target/debug/deps/libpetgraph-cfe6a91289e58554.rmeta --extern phf_0_10_1=/playground/target/debug/deps/libphf-2c3a935fed4b0ecc.rmeta --extern phf=/playground/target/debug/deps/libphf-5ef78680e45a47ac.rmeta --extern phf_codegen=/playground/target/debug/deps/libphf_codegen-c63c9bf5c48b3468.rmeta --extern phf_generator_0_10_0=/playground/target/debug/deps/libphf_generator-b1388f9f3bb85146.rmeta --extern phf_generator=/playground/target/debug/deps/libphf_generator-c366dcf7dfc0d711.rmeta --extern phf_macros=/playground/target/debug/deps/libphf_macros-6fad7aad0ba697f2.so --extern phf_shared_0_10_0=/playground/target/debug/deps/libphf_shared-794e59904c45fcef.rmeta --extern phf_shared=/playground/target/debug/deps/libphf_shared-c1a50076ba85c3a8.rmeta --extern pin_project_lite=/playground/target/debug/deps/libpin_project_lite-a5ae02aad56cc7b6.rmeta --extern pin_utils=/playground/target/debug/deps/libpin_utils-380243068ea90f58.rmeta --extern pkg_config=/playground/target/debug/deps/libpkg_config-5c37dcaa9b5d09eb.rmeta --extern png=/playground/target/debug/deps/libpng-6ceae98096970f5e.rmeta --extern postgres=/playground/target/debug/deps/libpostgres-e9806981026f6aa4.rmeta --extern postgres_protocol=/playground/target/debug/deps/libpostgres_protocol-ee14789c95de7975.rmeta --extern postgres_types=/playground/target/debug/deps/libpostgres_types-0e0bd16acd83a313.rmeta --extern powerfmt=/playground/target/debug/deps/libpowerfmt-f38d59aa90a8a70b.rmeta --extern ppv_lite86=/playground/target/debug/deps/libppv_lite86-cf44ab309bdfbd3f.rmeta --extern precomputed_hash=/playground/target/debug/deps/libprecomputed_hash-6154e18bb72758d7.rmeta --extern proc_macro2=/playground/target/debug/deps/libproc_macro2-dddfb56606c0d6aa.rmeta --extern psl_types=/playground/target/debug/deps/libpsl_types-ebecc993ed268dd7.rmeta --extern publicsuffix=/playground/target/debug/deps/libpublicsuffix-8604ab5db5b9fc88.rmeta --extern qoi=/playground/target/debug/deps/libqoi-5414f1920453f60f.rmeta --extern quote=/playground/target/debug/deps/libquote-cf38e82b5adea49d.rmeta --extern rand=/playground/target/debug/deps/librand-fdf4d00847bd6bfb.rmeta --extern rand_chacha=/playground/target/debug/deps/librand_chacha-22a26822e1509451.rmeta --extern rand_core=/playground/target/debug/deps/librand_core-41b5990cb5308fb5.rmeta --extern rand_distr=/playground/target/debug/deps/librand_distr-f7f54e0fd8f2ab0f.rmeta --extern rawpointer=/playground/target/debug/deps/librawpointer-e5a1bd7359a418d1.rmeta --extern rayon=/playground/target/debug/deps/librayon-b94bca6496656825.rmeta --extern rayon_core=/playground/target/debug/deps/librayon_core-9b4aba2e67bac29c.rmeta --extern regex=/playground/target/debug/deps/libregex-662d8d79f4d67820.rmeta --extern regex_automata=/playground/target/debug/deps/libregex_automata-18588151210fbc16.rmeta --extern regex_syntax=/playground/target/debug/deps/libregex_syntax-11ac219c81de2ae5.rmeta --extern reqwest=/playground/target/debug/deps/libreqwest-6cd9488ac747dc62.rmeta --extern ring=/playground/target/debug/deps/libring-72315e86be5040c3.rmeta --extern rusqlite=/playground/target/debug/deps/librusqlite-e4ea27e88d947153.rmeta --extern rustc_demangle=/playground/target/debug/deps/librustc_demangle-0d4d9ddebce559a6.rmeta --extern rustc_version=/playground/target/debug/deps/librustc_version-a94e41866d36c101.rmeta --extern rustix=/playground/target/debug/deps/librustix-fb7545b0d9efd749.rmeta --extern ryu=/playground/target/debug/deps/libryu-5718b7711c15d37c.rmeta --extern safe_arch=/playground/target/debug/deps/libsafe_arch-757fd01158132af7.rmeta --extern same_file=/playground/target/debug/deps/libsame_file-d9f8b73cbd13b9ec.rmeta --extern scopeguard=/playground/target/debug/deps/libscopeguard-a7d36e3695df41cf.rmeta --extern select=/playground/target/debug/deps/libselect-5b68e41c3bb58673.rmeta --extern semver=/playground/target/debug/deps/libsemver-8a1b272e6cb345f1.rmeta --extern serde=/playground/target/debug/deps/libserde-1e05031cb49763ab.rmeta --extern serde_value=/playground/target/debug/deps/libserde_value-4a3dd47453fe9256.rmeta --extern serde_derive=/playground/target/debug/deps/libserde_derive-f49c5216474f5202.so --extern serde_json=/playground/target/debug/deps/libserde_json-849b4f64d3f13295.rmeta --extern serde_spanned=/playground/target/debug/deps/libserde_spanned-a7a487f22479e95f.rmeta --extern serde_urlencoded=/playground/target/debug/deps/libserde_urlencoded-1a5ee79a84dc9c89.rmeta --extern serde_yaml=/playground/target/debug/deps/libserde_yaml-d56ad7e3c911352c.rmeta --extern sha1_smol=/playground/target/debug/deps/libsha1_smol-9406869b8eecfa86.rmeta --extern sha2=/playground/target/debug/deps/libsha2-2cd29e449d269dfe.rmeta --extern signal_hook_registry=/playground/target/debug/deps/libsignal_hook_registry-38195c9a1a9a9f2b.rmeta --extern simba=/playground/target/debug/deps/libsimba-5ec3c1f95d3903a2.rmeta --extern simd_adler32=/playground/target/debug/deps/libsimd_adler32-902124544f5ce5b3.rmeta --extern siphasher=/playground/target/debug/deps/libsiphasher-a55dcac2a0a36ca9.rmeta --extern slab=/playground/target/debug/deps/libslab-259cbd8436f8abb6.rmeta --extern smallvec=/playground/target/debug/deps/libsmallvec-10886728b5fb8985.rmeta --extern smawk=/playground/target/debug/deps/libsmawk-d8d8c588735a4851.rmeta --extern socket2_0_4_10=/playground/target/debug/deps/libsocket2-b3f8fc79bf9ffda0.rmeta --extern socket2=/playground/target/debug/deps/libsocket2-b5f54c4d2c19f3bb.rmeta --extern spin=/playground/target/debug/deps/libspin-cc5d01fe8406a518.rmeta --extern string_cache=/playground/target/debug/deps/libstring_cache-a8578a53ac1cbd7d.rmeta --extern string_cache_codegen=/playground/target/debug/deps/libstring_cache_codegen-485833c6b1ea6c6a.rmeta --extern stringprep=/playground/target/debug/deps/libstringprep-e04273b27df16031.rmeta --extern strsim=/playground/target/debug/deps/libstrsim-bc6f5a0abfdbb1fa.rmeta --extern subtle=/playground/target/debug/deps/libsubtle-5cf18242af9d06c4.rmeta --extern syn_1_0_109=/playground/target/debug/deps/libsyn-0ef2f6a6d13aadd8.rmeta --extern syn=/playground/target/debug/deps/libsyn-4fe9ae3852fb09a7.rmeta --extern tar=/playground/target/debug/deps/libtar-e101c0315a63c1b1.rmeta --extern tempfile=/playground/target/debug/deps/libtempfile-1b1e0588144dfd7e.rmeta --extern tendril=/playground/target/debug/deps/libtendril-85e8849557c0bd36.rmeta --extern termcolor=/playground/target/debug/deps/libtermcolor-5965d4792e617b4b.rmeta --extern terminal_size=/playground/target/debug/deps/libterminal_size-db71901e7b545274.rmeta --extern textwrap=/playground/target/debug/deps/libtextwrap-f433fbad1b261666.rmeta --extern thiserror=/playground/target/debug/deps/libthiserror-4a8690ba914f6ab1.rmeta --extern thiserror_impl=/playground/target/debug/deps/libthiserror_impl-3e28563bbd3f1f9e.so --extern thread_id=/playground/target/debug/deps/libthread_id-f0b68bb522b749f9.rmeta --extern thread_local=/playground/target/debug/deps/libthread_local-a6adebd5943da6cc.rmeta --extern threadpool=/playground/target/debug/deps/libthreadpool-9f1f26d500060b19.rmeta --extern tiff=/playground/target/debug/deps/libtiff-ece216d63dd1adca.rmeta --extern time=/playground/target/debug/deps/libtime-c30076bf800c840b.rmeta --extern time_core=/playground/target/debug/deps/libtime_core-571a06ac8ee70b6a.rmeta --extern time_macros=/playground/target/debug/deps/libtime_macros-8046e2a2b82a141c.so --extern tinyvec=/playground/target/debug/deps/libtinyvec-9e61337b1d4df5b9.rmeta --extern tinyvec_macros=/playground/target/debug/deps/libtinyvec_macros-bab93c57d22f3fc1.rmeta --extern tokio=/playground/target/debug/deps/libtokio-d60b7ec28873c0a2.rmeta --extern tokio_io=/playground/target/debug/deps/libtokio_io-211d04747dd16f60.rmeta --extern tokio_macros=/playground/target/debug/deps/libtokio_macros-a53ed17d7680c906.so --extern tokio_native_tls=/playground/target/debug/deps/libtokio_native_tls-753403f422b72ed3.rmeta --extern tokio_postgres=/playground/target/debug/deps/libtokio_postgres-4738fed96de95adf.rmeta --extern tokio_util=/playground/target/debug/deps/libtokio_util-7e15cbe8ab3f0242.rmeta --extern toml=/playground/target/debug/deps/libtoml-91e85a605d747c10.rmeta --extern toml_datetime=/playground/target/debug/deps/libtoml_datetime-ccbb70181aa77e1b.rmeta --extern toml_edit=/playground/target/debug/deps/libtoml_edit-d0a1d0772d9678f5.rmeta --extern tower_service=/playground/target/debug/deps/libtower_service-bf01067261c666e4.rmeta --extern tracing=/playground/target/debug/deps/libtracing-3428de4ca0e91287.rmeta --extern tracing_attributes=/playground/target/debug/deps/libtracing_attributes-ac6aa6442b70e43f.so --extern tracing_core=/playground/target/debug/deps/libtracing_core-d0f99c5ccf67ec37.rmeta --extern try_lock=/playground/target/debug/deps/libtry_lock-bdef16407c2dbcff.rmeta --extern typemap_ors=/playground/target/debug/deps/libtypemap_ors-e77cb9d9a94dccff.rmeta --extern typenum=/playground/target/debug/deps/libtypenum-59417263ea43a5c6.rmeta --extern unicase=/playground/target/debug/deps/libunicase-14a274de4f40e7c2.rmeta --extern unicode_bidi=/playground/target/debug/deps/libunicode_bidi-5dfbff942573c3d3.rmeta --extern unicode_ident=/playground/target/debug/deps/libunicode_ident-193eff69f94fd867.rmeta --extern unicode_linebreak=/playground/target/debug/deps/libunicode_linebreak-643abb4833c2e7a5.rmeta --extern unicode_normalization=/playground/target/debug/deps/libunicode_normalization-9c614d4aaffc1743.rmeta --extern unicode_segmentation=/playground/target/debug/deps/libunicode_segmentation-d0d89157db668afc.rmeta --extern unicode_width=/playground/target/debug/deps/libunicode_width-175e62156d763302.rmeta --extern unicode_xid=/playground/target/debug/deps/libunicode_xid-b22285c0e65e1c90.rmeta --extern unsafe_any_ors=/playground/target/debug/deps/libunsafe_any_ors-adab5934aa6e7cd8.rmeta --extern untrusted=/playground/target/debug/deps/libuntrusted-d26101cac75e7d31.rmeta --extern url=/playground/target/debug/deps/liburl-2d239c2566751af8.rmeta --extern utf8=/playground/target/debug/deps/libutf8-005090407780d0d8.rmeta --extern utf8parse=/playground/target/debug/deps/libutf8parse-63866257e9f1065b.rmeta --extern uuid=/playground/target/debug/deps/libuuid-7999db35697c9ef2.rmeta --extern vcpkg=/playground/target/debug/deps/libvcpkg-1bb62d00dc3def47.rmeta --extern version_check=/playground/target/debug/deps/libversion_check-fdc138016949b3a7.rmeta --extern walkdir=/playground/target/debug/deps/libwalkdir-9ff6fb738749f074.rmeta --extern want=/playground/target/debug/deps/libwant-2bcdac4abc1e5369.rmeta --extern weezl=/playground/target/debug/deps/libweezl-fc0d5b250e7fa7ac.rmeta --extern whoami=/playground/target/debug/deps/libwhoami-8104977ab2dca51e.rmeta --extern wide=/playground/target/debug/deps/libwide-8e7a492d8d7fb547.rmeta --extern winnow=/playground/target/debug/deps/libwinnow-d4836409f72d2b9e.rmeta --extern xattr=/playground/target/debug/deps/libxattr-b61ee3f6be8d31a2.rmeta --extern xml5ever=/playground/target/debug/deps/libxml5ever-fa6f5724d6e94e1c.rmeta --extern yaml_rust=/playground/target/debug/deps/libyaml_rust-fd74a71e33e91728.rmeta --extern zerocopy=/playground/target/debug/deps/libzerocopy-56a0b2327fa0244e.rmeta --extern zeroize=/playground/target/debug/deps/libzeroize-f9ca2be9dc6f6c6b.rmeta --extern zune_inflate=/playground/target/debug/deps/libzune_inflate-d853a63ac823377d.rmeta -L native=/playground/target/debug/build/libsqlite3-sys-7aa9b2922f23b355/out -L native=/playground/target/debug/build/ring-74ae94060f00a1d4/out` (signal: 11, SIGSEGV: invalid memory reference)

@Nadrieril Nadrieril added the C-bug Category: This is a bug. label Oct 30, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 30, 2023
@Nadrieril Nadrieril added the F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` label Oct 30, 2023
@compiler-errors
Copy link
Member

(side-note: doesn't overflow in the new trait solver ❤️)

@fmease fmease added fixed-by-next-solver Fixed by the next-generation trait solver, `-Znext-solver`. 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. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 30, 2023
@compiler-errors compiler-errors self-assigned this Oct 30, 2023
@compiler-errors
Copy link
Member

I'm gonna look into this

@compiler-errors compiler-errors removed the fixed-by-next-solver Fixed by the next-generation trait solver, `-Znext-solver`. label Oct 30, 2023
@bors bors closed this as completed in c5aec96 Oct 30, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 30, 2023
Rollup merge of rust-lang#117414 - compiler-errors:tait-forevert, r=oli-obk

Don't normalize to an un-revealed opaque when we hit the recursion limit

Currently, we will normalize `Opaque := Option<&Opaque>` to something like `Option<&Option<&Option<&...Opaque>>>`, hitting a limit and bottoming out in an unnormalized opaque after the recursion limit gets hit.

Unfortunately, during `layout_of`, we'll simply recurse and try again if the type normalizes to something different than the type:
https://github.com/rust-lang/rust/blob/e6e931dda5fffbae0fd87c5b1af753cc95556880/compiler/rustc_ty_utils/src/layout.rs#L58-L60

That means then we'll try to normalize `Option<&Option<&Option<&...Opaque>>>` again, substituting `Opaque` into itself even deeper. Eventually this will get to the point that we're just stack-overflowing on a really deep type before even hitting an opaque again.

To fix this, we just bottom out into `ty::Error` instead of the unrevealed opaque type.

Fixes rust-lang#117412

r? `@oli-obk`
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. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` 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.

4 participants