-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 StatementKind::CopyNonOverlapping #77511
Conversation
I've added placeholders to match statements on StatementKind, I'm not really sure how to properly implement most of them, but I put in some best guesses in some spots. |
☔ The latest upstream changes (presumably #77747) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
cfd2bef
to
4fd7b77
Compare
4fd7b77
to
c522f03
Compare
☔ The latest upstream changes (presumably #78267) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
c522f03
to
47abe9a
Compare
47abe9a
to
eeb4df8
Compare
Sorry for the extremely long delay, for some reason I thought this was blocked on something, my bad |
31a543e
to
318b63f
Compare
At this point I'm just waiting for this to become non-WIP/non-draft before reviewing further. It seemed fairly complete last time I looked at the code changes proposed here. |
This updates all places where match branches check on StatementKind or UseContext. This doesn't properly implement them, but adds TODOs where they are, and also adds some best guesses to what they should be in some cases.
Changed to various implementations, copying the style of prior function calls in places I was unsure of. Also one minor style nit.
Fixes copy_non_overlapping codegen_ssa to properly handle pointees, and use bytes instead of elem count
This replaces where it was previously being constructed in intrinsics, with direct construction of the Statement.
It was suggested to lower this in MIR instead of ssa, so do that instead.
@rustbot label: +S-waiting-on-review -S-waiting-on-author |
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.
👍 for the interpreter changes modulo the nit I raised. Thanks a lot :)
Also add some span_bugs where it is unreachable
@bors r=oli-obk |
📌 Commit 4bceb29 has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#77511 (Add StatementKind::CopyNonOverlapping) - rust-lang#79208 (Stabilize `unsafe_op_in_unsafe_fn` lint) - rust-lang#82411 (Fixes to ExitStatus and its docs) - rust-lang#82733 (Add powerpc-unknown-openbsd target) - rust-lang#82802 (Build rustdoc for run-make tests, not just run-make-fulldeps) - rust-lang#82849 (Add Option::get_or_default) - rust-lang#82908 (:arrow_up: rust-analyzer) - rust-lang#82937 (Update README.md to use the correct cmake version number) - rust-lang#82938 (Bump tracing-tree dependency) - rust-lang#82942 (Don't hardcode the `v1` prelude in diagnostics, to allow for new preludes.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
self.memory.check_ptr_access(self.read_scalar(&src)?.check_init()?, size, align)?; | ||
|
||
let dst = | ||
self.memory.check_ptr_access(self.read_scalar(&dst)?.check_init()?, size, align)?; |
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.
I just noticed that this is wrong -- the size used for the access check here needs to be the full size, already multiplied with the count!
I'll submit a PR.
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.
Done: #82967
fix copy_nonoverlapping Fixes a bug introduced by rust-lang#77511 r? `@oli-obk` Fixes rust-lang#82961
…-obk fix error message for copy(_nonoverlapping) overflow Fixes an error message regression introduced in rust-lang#77511 (and adds tests). r? `@oli-obk`
Implements rust-lang/compiler-team#348
r? @nagisa