-
Notifications
You must be signed in to change notification settings - Fork 93
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
Audit copy_nonoverlapping
intrinsic
#1201
Audit copy_nonoverlapping
intrinsic
#1201
Conversation
1c61e9d
to
03d7f54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reducing the duplicated code. I just have a few comments besides my previous comment that I published too soon.
@@ -0,0 +1 @@ | |||
memcpy src/dst overlap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a CBMC message? I was wondering if we change it to say copy_nonoverlap here. Do we use memcpy anywhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a CBMC message so there's not much we can do. We use memcpy
in our __rust_realloc
C implementation but we don't generate calls to memcpy
anywhere else.
tests/expected/intrinsics/copy-nonoverlapping/copy-unaligned-dst/expected
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks
Description of changes:
Completes the audit for the
copy_nonoverlapping
intrinsic by reusing the work done on thecopy
intrinsic (see #1199):src
anddst
.Resolved issues:
Resolves #1198
Part of #1163
Testing:
How is this change tested? Existing regression and new tests
Is this a refactor change? No.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.