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

The latest version is corrupt on Windows11 #38

Open
ulic-youthlic opened this issue Jan 22, 2024 · 0 comments
Open

The latest version is corrupt on Windows11 #38

ulic-youthlic opened this issue Jan 22, 2024 · 0 comments

Comments

@ulic-youthlic
Copy link

The latest version of kytan depends on the v0.7 mio library. However, v0.7 mio on Windows11 relies on version 0.3 of ntapi, which according to my tests no longer compiles (To be precise, it is version v0.3.7).

  • This is part of the Cargo.toml for the v0.7.14 version of mio.
[target.'cfg(windows)'.dependencies]
miow   = "0.3.6"
winapi = { version = "0.3", features = ["winsock2", "mswsock", "mstcpip"] }
ntapi  = "0.3"
  • This is the error message when compiling the 0.3 version of ntapi.
error[E0793]: reference to packed field is unaligned
    --> src\ntexapi.rs:2783:52
     |
2783 |         *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
     = note: 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)

error[E0793]: reference to packed field is unaligned
    --> src\ntexapi.rs:2807:25
     |
2807 |         ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
     = note: 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)

For more information about this error, try `rustc --explain E0793`.
error: could not compile `ntapi` (lib) due to 2 previous errors

Finally, I've included information about the toolchain and platform:

  • OS: Windows 11 Professional Insider Preview x86_64
  • Kernel: 10.0.23619
  • Rust Toolchain: stable-x86_64-pc-windows-msvc
    • version: rustc 1.75.0 (82e1608df 2023-12-21)
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

1 participant