You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory blows up on a simple program that uses String find #2001
T-CBMCIssue related to an existing CBMC issue[C] Feature / EnhancementA new feature request or enhancement to an existing feature.[E] PerformanceTrack performance improvement (Time / Memory / CPU)
#[kani::proof]#[kani::unwind(5)]fnmain(){letmut s = String::with_capacity(8);let c:char = kani::any();
s.push(c);assert!(s.find(c).is_some());}
memory usage approaches 32 GB after ~90 seconds.
With an unwind of 4, it terminates after about 6.5 minutes with an unwinding assertion failure. Memory usage reaches 17 GB at some point:
SUMMARY:
** 1 of 677 failed (676 undetermined)
Failed Checks: unwinding assertion loop 0
File: "<builtin-library-memcmp>", line 25, in memcmp
VERIFICATION:- FAILED
[Kani] info: Verification output shows one or more unwinding failures.
[Kani] tip: Consider increasing the unwinding value or disabling `--unwinding-assertions`.
Verification Time: 387.56683s
T-CBMCIssue related to an existing CBMC issue[C] Feature / EnhancementA new feature request or enhancement to an existing feature.[E] PerformanceTrack performance improvement (Time / Memory / CPU)
Activity
zhassan-aws commentedon Jan 14, 2026
The blowup seems to be occurring due to some complexity in the implementation of
find. If I replace it with a simple implementation:verification goes through:
SUMMARY: ** 0 of 537 failed (8 unreachable) VERIFICATION:- SUCCESSFUL Verification Time: 1.6898446s Manual Harness Summary: Complete - 1 successfully verified harnesses, 0 failures, 1 total.