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

ntapi 0.3.7 contains code that will be incompatible with future versions of Rust #11

Closed
philpax opened this issue Aug 6, 2022 · 0 comments · Fixed by #12
Closed

ntapi 0.3.7 contains code that will be incompatible with future versions of Rust #11

philpax opened this issue Aug 6, 2022 · 0 comments · Fixed by #12

Comments

@philpax
Copy link

philpax commented Aug 6, 2022

Hi there!

Compiling ntapi (downstream dependency of one of my dependencies) with today (2022-08-06)'s nightly compiler results in the following warning:
warning: the following packages contain code that will be rejected by a future version of Rust: ntapi v0.3.7

The resulting cargo report looks like this:

The package `ntapi v0.3.7` currently triggers the following future incompatibility lints:
> warning: reference to packed field is unaligned
>     --> .cargo\registry\src\github.com-1ecc6299db9ec823\ntapi-0.3.7\src\ntexapi.rs:2783:52
>      |
> 2783 |         *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
>      |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>      |
>      = note: `#[allow(unaligned_references)]` on by default
>      = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>      = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
>      = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
>      = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
>
> warning: reference to packed field is unaligned
>     --> .cargo\registry\src\github.com-1ecc6299db9ec823\ntapi-0.3.7\src\ntexapi.rs:2807:25
>      |
> 2807 |         ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
>      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>      |
>      = note: `#[allow(unaligned_references)]` on by default
>      = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>      = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
>      = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
>      = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)

Hoping this isn't too troublesome to fix 🙏

jenshnielsen added a commit to jenshnielsen/nushell that referenced this issue Oct 23, 2022
0.3.7 trigger a warning about code being incompatible
with future rust versions. This is resolved in 0.4
MSxDOS/ntapi#11
jenshnielsen added a commit to jenshnielsen/nushell that referenced this issue Oct 30, 2022
0.3.7 trigger a warning about code being incompatible
with future rust versions. This is resolved in 0.4
MSxDOS/ntapi#11
sholderbach pushed a commit to nushell/nushell that referenced this issue Oct 30, 2022
* Bump nushell-sytem dep to ntapi 0.4

0.3.7 trigger a warning about code being incompatible
with future rust versions. This is resolved in 0.4
MSxDOS/ntapi#11

* Upgrade Cargo.lock for ntapi 0.4
octol added a commit to nymtech/nym that referenced this issue Feb 14, 2023
Fixes build on windows with nightly rustc due to

    MSxDOS/ntapi#11
octol added a commit to nymtech/nym that referenced this issue Feb 14, 2023
Fixes build on windows with nightly rustc due to

    MSxDOS/ntapi#11
jcaesar added a commit to jcaesar/fork-rq that referenced this issue Feb 28, 2023
Fixes CI failure due to ntapi MSxDOS/ntapi#11
ryoqun added a commit to solana-labs/solana that referenced this issue Jun 5, 2023
* Patch ntapi to restore windows build

* Update Cargo.lock...

* Add comment for justification of this patching

MSxDOS/ntapi#11
MSxDOS/ntapi#12

* Revert "ci: stop windows building on master temporarily (#31353)"

This reverts commit 2dcdfff.

* Use solana-labs fork

* Ugh..
ryoqun added a commit to ryoqun/solana that referenced this issue Jun 6, 2023
* Patch ntapi to restore windows build

* Update Cargo.lock...

* Add comment for justification of this patching

MSxDOS/ntapi#11
MSxDOS/ntapi#12

* Revert "ci: stop windows building on master temporarily (solana-labs#31353)"

This reverts commit 2dcdfff.

* Use solana-labs fork

* Ugh..
ryoqun added a commit to solana-labs/solana that referenced this issue Jun 6, 2023
* Shift crossbeam comment for upcoming 2nd patch... (#31963)

* Patch ntapi to restore windows build (#31961)

* Patch ntapi to restore windows build

* Update Cargo.lock...

* Add comment for justification of this patching

MSxDOS/ntapi#11
MSxDOS/ntapi#12

* Revert "ci: stop windows building on master temporarily (#31353)"

This reverts commit 2dcdfff.

* Use solana-labs fork

* Ugh..

* Patch ntapi more thoroughly (#31970)

* Patch spl-token-cli build as well...

* Patch sbf/Cargo.toml for consistency

* Remove --locked for cli-arg based patch... (#31971)

* Bump patched ntapi from v0.3.6 to v0.3.7 (#31981)

* Revert "ci: stop windows build (#31893)"

This reverts commit 30f9e43.
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

Successfully merging a pull request may close this issue.

1 participant