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

set kani default value to 1 #3912

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
5 changes: 3 additions & 2 deletions kani-driver/src/call_cbmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ pub fn resolve_unwind_value(
) -> Option<u32> {
// Check for which flag is being passed and prioritize extracting unwind from the
// respective flag/annotation.
args.unwind.or(harness_metadata.attributes.unwind_value).or(args.default_unwind)
// If no unwind value is specified, default to 1 to prevent memory consumption issues
args.unwind.or(harness_metadata.attributes.unwind_value).or(args.default_unwind).or(Some(1))
}

#[cfg(test)]
Expand Down Expand Up @@ -575,7 +576,7 @@ mod tests {
}

// test against no unwind annotation
assert_eq!(resolve(&args_empty, &harness_none), None);
assert_eq!(resolve(&args_empty, &harness_none), Some(1));
assert_eq!(resolve(&args_only_default, &harness_none), Some(2));
assert_eq!(resolve(&args_only_harness, &harness_none), Some(1));
assert_eq!(resolve(&args_both, &harness_none), Some(1));
Expand Down
Loading