-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Test and reject out-of-bounds shuffle vectors #76768
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @RalfJung |
Thanks, this looks good! Is |
Well, I can macro the test over the various other LLVM shuffle intrinsics. It didn't seem immediately necessary because they would all follow the pattern, so I figured any old canary would tell us how it is in the coalmine. But there are actually a few other tests for this floating in the compiler that verify this error code is emitted (since it basically exists for this issue). As far as I can tell, it would be only the shuffles, and maybe insert/extract, that could apply out-of-bounds logic in the first place. |
Yeah, would be good to have all intrinsic bounds checks covered here. Canaries are great but without knowing how the check works internally it is easy to think one has covered all code paths but forget about some odd special case... When I grep for that error code, most existing tests seem to be about other aspects? In fact I can see none that says anything about "out of bounds". The test should cover all intrinsics that can have that particular error. The error code is for all sorts of problems with intrinsics. |
That's completely fair, will generalize this fully then (and figure out if insert/extract can go OOB... if they can, I'll include them). |
@workingjubilee From what I can see, this is still outstanding. |
Indeed it was! @rustbot modify labels: -S-waiting-on-author, +S-waiting-on-review |
815296c
to
628b5a5
Compare
628b5a5
to
c47caea
Compare
Force pushes were tidy thrash, whoops. |
r=me with or without |
Error: Label if can only be set by Rust team members Please let |
@workingjubilee: 🔑 Insufficient privileges: Not in reviewers |
RIP me. 💦 |
@bors r=ralfjung rollup |
📌 Commit 2fcd183 has been approved by |
Sorry -- next time I'll let bors know that you can do this. :) |
Rollup of 11 pull requests Successful merges: - rust-lang#75143 (Use `tracing` spans to trace the entire MIR interp stack) - rust-lang#75699 (Uplift drop-bounds lint from clippy) - rust-lang#76768 (Test and reject out-of-bounds shuffle vectors) - rust-lang#77190 (updated p! macro to accept literals) - rust-lang#77388 (Add some regression tests) - rust-lang#77419 (Create E0777 error code for invalid argument in derive) - rust-lang#77447 (BTreeMap: document DrainFilterInner better) - rust-lang#77468 (Fix test name) - rust-lang#77469 (Improve rustdoc error for failed intra-doc link resolution) - rust-lang#77473 (Make --all-targets in x.py check opt-in) - rust-lang#77508 (Fix capitalization in blog post name) Failed merges: r? `@ghost`
Fixes #73542.