generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Labels
[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.
Description
I tried this code:
fn main() {
let x: &str = "hello";
assert!(x == "hello");
}using the following command line invocation:
rmc <filename>.rs
with RMC version:
- Branch: main-152-2021-05-18
- Hash: 662d19b
I expected to see this happen: RMC verifies the assertion, terminates, and prints VERIFICATION SUCCESSFUL.
Instead, this happened: RMC goes into an infinite loop, unwinding the string comparison loop:
Unwinding loop memcmp.0 iteration 731 file <builtin-library-memcmp> line 25 function memcmp thread 0
Notice that this problem does not occur with CBMC when given the following equivalent C program:
#include <assert.h>
#include <string.h>
void main()
{
char *x = "hello";
assert(strcmp(x, "hello") == 0);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.