Skip to content

Comments

Incorporate #602#607

Merged
0xpr03 merged 3 commits intomainfrom
pr_602
Jun 26, 2024
Merged

Incorporate #602#607
0xpr03 merged 3 commits intomainfrom
pr_602

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
@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