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

Add loop contracts and harness for small_slice_eq #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qinheping
Copy link

@qinheping qinheping commented Oct 19, 2024

Porting from https://github.com/model-checking/kani/blob/main/tests/expected/loop-contract/small_slice_eq.rs

The cbmc argument --object-bits 8 is needed to avoid running out of memory for the harness.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@qinheping qinheping requested a review from a team as a code owner October 19, 2024 05:14
@qinheping
Copy link
Author

The method small_slice_eq and the harness only runs for configuration target_arch = "x86_64" and target_feature = "sse2", and hence is not tested in the current CI checks.

Copy link

@celinval celinval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also please add a contract to this function since it is unsafe?

library/core/src/str/pattern.rs Outdated Show resolved Hide resolved
library/core/src/str/pattern.rs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants