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
CStr Safety invariant & Harnesses for from_bytes_until_nul (#180)
Towards #150
### Changes
* Added a `CStr` Safety Invariant
* Added a harness for `from_bytes_until_nul`, the harness covers:
* The input slice contains a single null byte at the end;
* The input slice contains no null bytes;
* The input slice contains intermediate null bytes
### Discussion
* [Safety invariant
implementation](#150 (comment))
* [Input array
generation](#181)
### Verification Result
`./scripts/run-kani.sh --kani-args --harness ffi::c_str::verify`
```
// array size 16
Checking harness ffi::c_str::verify::check_from_bytes_until_nul...
VERIFICATION RESULT:
** 0 of 140 failed (5 unreachable)
VERIFICATION:- SUCCESSFUL
Verification Time: 7.3023376s
Complete - 1 successfully verified harnesses, 0 failures, 1 total.
```
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
0 commit comments