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

regression: Context changed sizes #123283

Closed
Mark-Simulacrum opened this issue Mar 31, 2024 · 4 comments
Closed

regression: Context changed sizes #123283

Mark-Simulacrum opened this issue Mar 31, 2024 · 4 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

[INFO] [stdout] error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
[INFO] [stdout]   --> fos/src/fc/future.rs:46:44
[INFO] [stdout]    |
[INFO] [stdout] 46 |                 let mut fake_cx = unsafe { std::mem::transmute(&fake_cx) };
[INFO] [stdout]    |                                            ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: source type: `&u64` (64 bits)
[INFO] [stdout]    = note: target type: `Context<'_>` (128 bits)

This looks like it was probably always unstable and/or UB, but filing to make sure we dive a bit deeper.

@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Mar 31, 2024
@Mark-Simulacrum Mark-Simulacrum added this to the 1.78.0 milestone Mar 31, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 31, 2024
@fmease
Copy link
Member

fmease commented Mar 31, 2024

Lol, someone is trying to transmute &0 (a reference to 0) to a std::task::Context. This looks super dubious and only used to work on 64-bit machines anyway. Type size is not considered to be part of the API. This is a WONTFIX I'm pretty sure. PR #118960 “regressed” this by adding a LocalWaker to the Context.

@fmease fmease added T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 31, 2024
@Mark-Simulacrum
Copy link
Member Author

Sounds right to me.

@Mark-Simulacrum Mark-Simulacrum closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2024
@fmease fmease removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 31, 2024
@apiraino
Copy link
Contributor

apiraino commented Apr 2, 2024

Does anything in our crater run config need to be tweaked to avoid this crate crashing when running the next crater run?

@Mark-Simulacrum
Copy link
Member Author

No, it'll just be a build-fail to build-fail result. We ignore those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants