Skip to content

Assertion failure in codegen_vtable_method_field #1596

Closed

Description

@tedinski

Triggerable by log4rs (notably, not by typemap just by itself! Probably needs monomorphization, perhaps in a specific way. I note dyn a few times down there...)

$ cargo new log4rs-test
     Created binary (application) `log4rs-test` package
$ cd log4rs-test/
$ cargo add log4rs
    Updating crates.io index
      Adding log4rs v1.1.1 to dependencies.
             Features:
             [SNIP]]
ubuntu@ip-172-31-42-230:~/experiments/specific_crate_failures/log4rs-test$ cargo kani
[..SNIP..]
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', kani-compiler/src/codegen_cprover_gotoc/codegen/rvalue.rs:770:82
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Kani unexpectedly panicked during compilation.
If you are seeing this message, please file an issue here: https://github.com/model-checking/kani/issues/new?labels=bug&template=bug_report.md

[Kani] current codegen item: codegen_function: <std::collections::HashMap<std::string::String, std::sync::Arc<dyn config::raw::ErasedDeserialize<Trait = dyn append::Append>>> as typemap::CloneAny>::clone_any_send
_RNvXs3_NtCs5IexpxewA1L_7typemap9internalsINtNtNtNtCslqDs7LX7IdZ_3std11collections4hash3map7HashMapNtNtCscUrnc3AuwlW_5alloc6string6StringINtNtB1C_4sync3ArcDNtNtNtCs5Q9lqu4ek6F_6log4rs6config3raw17ErasedDeserializep5TraitDNtNtB2z_6append6AppendEL_EL_EENtB5_8CloneAny14clone_any_sendB2z_
[Kani] current codegen location: Loc { file: "/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/typemap-0.3.3/src/internals.rs", function: None, start_line: 43, start_col: Some(5), end_line: 43, end_col: Some(70) }
error: could not compile `log4rs`
Error: cargo exited with status exit status: 101

The unwrap that fails:

let field_type =
            vtable_type.lookup_field_type(vtable_field_name, &self.symbol_table).unwrap();

Activity

  1. added
    [C] Bug
    on Aug 26, 2022
  2. removed their assignment
    on Jan 24, 2025
  3. zhassan-aws commented on Jan 30, 2025

    @zhassan-aws
    Contributor

    This no longer crashes with 3e93311:

        Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.48s
    No proof harnesses (functions with #[kani::proof]) were found to verify.
    
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] Bug[F] Crash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions