-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix ICE with ReadPointerAsBytes
validation error
#80900
Conversation
--> $DIR/issue-79690.rs:26:1 | ||
| | ||
LL | const G: Fat = unsafe { Transmute { t: FOO }.u }; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered read of part of a pointer at .1.<deref>.size.foo |
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.
This error message doesn't seem super clear to me. In fact, I'm not sure if I understand it! Will it be understandable to people getting this error, or can it be improved somehow?
The job Click to see the possible cause of the failure (guessed by this bot)
|
Huh, I guess this test made us reach tidy's limit!
What should I do? |
I guess you're the first case? 😄 You could move it to |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Um... that's really weird: I moved the test and the error message changed: ---- [ui] ui/consts/issue-79690.rs stdout ----
diff of stderr:
2 --> $DIR/issue-79690.rs:26:1
3 |
4 LL | const G: Fat = unsafe { Transmute { t: FOO }.u };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered read of part of a pointer at .1.<deref>.size.foo
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered pointer to alloc4 at .1.<deref>.size.foo, but expected initialized plain (non-pointer) bytes
6 |
7 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8 |
That's super odd. I don't think it can be the move, maybe something changed on master under you? Try rebasing and reblessing. |
Apparently `tidy` has a hard limit of 2830 tests in the `src/test/ui/issues/` directory, and this test hit that limit. `src/test/ui/consts/` is probably a better location anyway.
3c1dd4d
to
a7b7a43
Compare
Rebased. Rerunning test locally. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Huh, the test passed locally but not on CI... |
@oli-obk I rebased and ran the test locally, and it passed. But, it's still failing on CI.
So, I'm not sure what's going on. Maybe we should get someone from T-infra to take a look at it? |
The one thought I have is that maybe this is some kind of platform-specific code in the compiler that's being executed (I'm on macOS and CI is Linux, so it's different platforms), but I don't see why this compiler code should be platform-specific since it's MIR-based. |
Aaah... I found the issue. CI is testing on 32 bit. So just ignore the test on 32 bit, it's not worth supporting that case in this specific test. |
Done! |
@bors squash |
(I think |
This comment has been minimized.
This comment has been minimized.
9b2aca1
to
2be1993
Compare
@bors r+ rollup 🤷 it's fine by me |
📌 Commit 2be1993 has been approved by |
…li-obk Fix ICE with `ReadPointerAsBytes` validation error Fixes rust-lang#79690. r? `````@oli-obk`````
Rollup of 14 pull requests Successful merges: - rust-lang#80812 (Update RELEASES.md for 1.50.0) - rust-lang#80876 (Add `unwrap_unchecked()` methods for `Option` and `Result`) - rust-lang#80900 (Fix ICE with `ReadPointerAsBytes` validation error) - rust-lang#81191 (BTreeMap: test all borrowing interfaces and test more chaotic order behavior) - rust-lang#81195 (Account for generics when suggesting bound) - rust-lang#81299 (Fix some bugs reported by eslint) - rust-lang#81325 (typeck: Don't suggest converting LHS exprs) - rust-lang#81353 (Fix spelling in documentation for error E0207) - rust-lang#81369 (rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry) - rust-lang#81389 (rustdoc: Document CommonMark extensions.) - rust-lang#81399 (Update books) - rust-lang#81401 (tidy: Some code cleanup.) - rust-lang#81407 (Refine "remove semicolon" suggestion in trait selection) - rust-lang#81412 (Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #79690.
r? @oli-obk