Skip to content

A crash bug identified during the verification #1532

@stoneman258

Description

@stoneman258

While verifying a Rust project with Prusti (version 0.2.2), it reports an internal error: "Consistency error: No matching local variable". The command used was cargo prusti. Below is a minimized code example reproducing the issue:

use prusti_contracts::*;
#[pure]
fn negate_i32(x: i32) -> i32 { [0-x, x][0] }
fn main() { negate_i32(i32::MIN); }

Crash Stack Trace

error: [Prusti: internal error] Prusti encountered an unexpected internal error
  |
  = note: This is likely to be a bug in Prusti. We would appreciate a bug report: https://github.com/viperproject/prusti-dev/issues/new
  = note: Details: consistency error in testcase::main: Consistency error: No matching local variable _1 found with type Ref, instead found Int. (@8.0)
error: [Prusti: internal error] Prusti encountered an unexpected internal error
  |
  = note: This is likely to be a bug in Prusti. We would appreciate a bug report: https://github.com/viperproject/prusti-dev/issues/new
  = note: Details: consistency error in testcase::main: Consistency error: All elements of sequence must have same type. (@11.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions