Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit suggestions and an explanation when CBMC runs out of memory #2885

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion kani-driver/src/call_cbmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,17 @@ impl VerificationResult {
}
Err(exit_status) => {
let verification_result = console::style("FAILED").red();
let explanation = if *exit_status == 137 {
"CBMC appears to have run out of memory. You may want to rerun your proof in \
an environment with additional memory or use stubbing to reduce the size of the \
code the verifier reasons about.\n"
} else {
""
};
format!(
"\nCBMC failed with status {exit_status}\nVERIFICATION:- {verification_result}\n",
"\nCBMC failed with status {exit_status}\n\
VERIFICATION:- {verification_result}\n\
{explanation}",
)
}
}
Expand Down