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

Unable to test early finalization prevention #45

Closed
jacob-hughes opened this issue Jan 19, 2022 · 1 comment
Closed

Unable to test early finalization prevention #45

jacob-hughes opened this issue Jan 19, 2022 · 1 comment

Comments

@jacob-hughes
Copy link
Collaborator

Early finalization prevention is done with the prevent_early_finalization MIR transformation. It's not possible to test this with a mir-opt test because diffing MIR generated from the alloc crate leads to different output on different architectures. The crate hash for alloc::Gc is pulled in and that changes depending on which machine compiles the test. Although this isn't necessary to show that early finalization was prevented, right now there's no way to use a wildcard for this particular output when comparing the diffs.

jacob-hughes added a commit to jacob-hughes/alloy that referenced this issue Jan 19, 2022
The GcSmartPointer trait was a hangover which let the compiler identify
`Gc<T>` structs when they were defined as part of a non-rustc library.
Now that the `Gc` implementation is part of the standard library, this
is unnecessary and adds complexity.

This requires the prevent_early_finalization mir-opt tests to be
temporarily ignored due to an issue with non-deterministic builds when
bringing in the alloc crate across different machines. [1]

[1]: softdevteam#45
@ltratt
Copy link
Member

ltratt commented Oct 22, 2022

I think we can close this issue?

jacob-hughes added a commit to jacob-hughes/alloy that referenced this issue May 17, 2023
The GcSmartPointer trait was a hangover which let the compiler identify
`Gc<T>` structs when they were defined as part of a non-rustc library.
Now that the `Gc` implementation is part of the standard library, this
is unnecessary and adds complexity.

This requires the prevent_early_finalization mir-opt tests to be
temporarily ignored due to an issue with non-deterministic builds when
bringing in the alloc crate across different machines. [1]

[1]: softdevteam#45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants