Skip to content

CBMC errors out with l2_rename_rvalues case struct not handled #6911

Closed

Description

@zhassan-aws

This test is derived from Kani (see model-checking/kani#1257).

CBMC version: 5.58.1
Operating system: Ubuntu 20.04
Exact command line resulting in the issue: cbmc test.out
What behaviour did you expect: Verification successful
What happened instead:

$ cbmc test.out
CBMC version 5.58.1 (cbmc-5.58.1) 64-bit x86_64 linux
Reading GOTO program from file test.out.for-main
Generating GOTO Program
Adding CPROVER library (x86_64)
Removal of function pointers and virtual functions
Generic Property Instrumentation
Running with 8 object bits, 56 offset bits (default)
Starting Bounded Model Checking
l2_rename_rvalues case `struct' not handled

test.out.tar.gz

Activity

  1. changed the title [-]CBMC errors out with `l2_rename_rvalues case `struct' not handled`[/-] [+]CBMC errors out with `l2_rename_rvalues case struct not handled`[/+] on Jun 7, 2022
  2. tautschnig commented on Jun 7, 2022

    @tautschnig
    Collaborator

    I'll take a look. This warning arises when there is a struct constant on the left-hand side of an expression. I'll debug to see whether this is part of the input to CBMC, or wrongly generated by CBMC.

  3. self-assigned this
    on Jun 7, 2022
  4. added
    aws
    on Jun 7, 2022
  5. tautschnig commented on Jun 8, 2022

    @tautschnig
    Collaborator

    The issue appears to be in the code generated by Kani, which includes the following (printed from the goto binary, but it's also present in the JSON file):

            // 2453 file /home/ubuntu/.rustup/toolchains/nightly-2022-05-17-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs line 200 column 9 function std::boxed::Box::<T>::new
            // Labels: bb1
         1: ASSIGN { side_effect statement="nondet", { side_effect statement="nondet", { address_of(_RNvCsfShb9xCnOLq_4_12578plus_one) } } } := { side_effect statement="nondet", { side_effect statement="nondet", { cast(_RNvMNtCs98ieuN1Qc8M_5alloc5boxedINtB2_3BoxNvCsfShb9xCnOLq_4_12578plus_oneE3newBG_::1::var_4, code*) } } }
    

    Note the struct on the left-hand side of this assignment.

  6. jimgrundy commented on Aug 23, 2022

    @jimgrundy
    Collaborator

    We now have a version of this in a C code repository, so, not Kani specific. I'll see if we can get a version of it posted.

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

Metadata

Metadata

Assignees

Labels

awsaws-high

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions