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

Incorporate #602 #607

Merged
merged 3 commits into from
Jun 26, 2024
Merged

Incorporate #602 #607

merged 3 commits into from
Jun 26, 2024

Conversation

0xpr03
Copy link
Member

@0xpr03 0xpr03 commented Jun 26, 2024

Rebased version of #602 to fix up the old unsafe code for the windows API.

Also fixes the freeBSD pipeline.

Closes #602

encounter and others added 3 commits June 26, 2024 15:54
The primary issue is that `mem::transmute`
from `isize` to `Box<_>` (without first
casting to `*mut _`) is undefined behavior.

On Rust v1.78.0+, this ends up crashing with
`STATUS_ILLEGAL_INSTRUCTION` when
`ReadDirectoryChangesW` fails and this
branch is hit in release mode.

While this could be fixed by simply adding
`as *mut ReadDirectoryRequest`, this cleans
up the overall unsafe logic to be more
readable and idiomatic Rust.
@0xpr03 0xpr03 merged commit ecf0d95 into main Jun 26, 2024
13 checks passed
@0xpr03 0xpr03 deleted the pr_602 branch June 26, 2024 14: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

Successfully merging this pull request may close these issues.

2 participants