Skip to content
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