Skip to content

cargo check panics on has_ffi_unwind_calls #107797

Closed

Description

@selfisekai

Code

full repo causing the bug: https://codeberg.org/transcast/reytan/src/branch/rust/bug-107797

no idea what is causing this, I don't get this error without my uncommitted changes, but they don't seem to change anything about the mentioned file or function.

this happens on cargo check specifically (rust-analyzer doesn't work here either). cargo build on the mentioned package works successfully.

other package I was working on doesn't build with unrelated and valid errors (didn't realize that rust-analyzer wasn't working).

Meta

rustc --version --verbose:

rustc 1.67.0 (fc594f156 2023-01-24) (Alpine Linux)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-alpine-linux-musl
release: 1.67.0
LLVM version: 15.0.7

Error output

thread 'rustc' panicked at 'attempted to read from stolen value: rustc_middle::mir::Body', compiler/rustc_mir_transform/src/ffi_unwind_calls.rs:50:78
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.67.0 (fc594f156 2023-01-24) (Alpine Linux) running on x86_64-alpine-linux-musl

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [has_ffi_unwind_calls] checking if `context::<impl at extractor_api/src/context.rs:20:1: 20:23>::send_request` contains FFI-unwind calls
#1 [required_panic_strategy] getting a crate's required panic strategy
end of query stack
error: could not compile `reytan_extractor_api`
Backtrace

stack backtrace:
   0:     0x7fd81d6761ba - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h32f8aa4a30260bb4
   1:     0x7fd81d6d5c4e - core::fmt::write::h8899c18ed7936b98
   2:     0x7fd81d667d35 - <unknown>
   3:     0x7fd81d675f85 - <unknown>
   4:     0x7fd81d678ccf - <unknown>
   5:     0x7fd81d678a0b - std::panicking::default_hook::hd28a596ca82c6910
   6:     0x7fd81aa5b2b6 - <unknown>
   7:     0x7fd81d6794ad - std::panicking::rust_panic_with_hook::h989777cb1bebd724
   8:     0x7fd81d679229 - <unknown>
   9:     0x7fd81d67666c - <unknown>
  10:     0x7fd81d678f32 - rust_begin_unwind
  11:     0x7fd81d63b7b3 - core::panicking::panic_fmt::h764344f447c08b0f
  12:     0x7fd81b158dbf - <unknown>
  13:     0x7fd81bb5bc89 - <unknown>
  14:     0x7fd81bac5d5e - <unknown>
  15:     0x7fd81bdc040d - <unknown>
  16:     0x7fd81b15911a - <unknown>
  17:     0x7fd81bb8fae0 - <unknown>
  18:     0x7fd81bac8c47 - <unknown>
  19:     0x7fd81bdc0529 - <unknown>
  20:     0x7fd81c1316f2 - <unknown>
  21:     0x7fd81c147884 - rustc_metadata[3c313f0f57f9ee97]::rmeta::encoder::encode_metadata
  22:     0x7fd81c156c20 - rustc_metadata[3c313f0f57f9ee97]::fs::encode_and_write_metadata
  23:     0x7fd81ab0fa41 - rustc_interface[5f2ab11d964c70d1]::passes::start_codegen
  24:     0x7fd81ab177cb - <rustc_interface[5f2ab11d964c70d1]::queries::Queries>::ongoing_codegen
  25:     0x7fd81aa38a75 - <unknown>
  26:     0x7fd81aa31d56 - <unknown>
  27:     0x7fd81aa39fd4 - <unknown>
  28:     0x7fd81d682d03 - <unknown>
  29:     0x7fd81d7b708b - <unknown>

Activity

  1. added
    C-bugCategory: This is a bug.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 8, 2023
  2. selfisekai commented on Feb 14, 2023

    @selfisekai
    Author

    follow-up: crashes were reproducible on my machine until rustc got updated. running cargo check then also caused rebuilding all dependencies

  3. added
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Mar 3, 2023
  4. cjgillot commented on Apr 13, 2023

    @cjgillot
    Contributor

    Marking as fixed by #108820. Please open a new instance of this bug if it appears again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions