-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Avoid UB in the Windows filesystem code in... bootstrap? #101455
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems fine, yeah. r=me if you want.
Is there no safe way to make a symlink on windows??
This makes a juncture point, which is like a symlink but only works on directories. I would assume the reason it's used here is because it works without special permissions or developer mode being enabled. Perhaps std should expose a safe API. |
@bors r=jyn514 |
Avoid UB in the Windows filesystem code in... bootstrap? This basically a subset of the changes from rust-lang#101171. I didn't think to look in src/bootstrap for more windows filesystem API usage, which was apparently a mistake on my part. It's kinda goofy that stuff like this is in here, but what are you gonna do, computers are awful. I also added `winbase` to the `winapi` dep -- I tested this in a tmp crate but needed to add this to your Cargo.toml -- you `use winapi::stuff::winbase` in this function, but are relying on something else turning on that feature.
Avoid UB in the Windows filesystem code in... bootstrap? This basically a subset of the changes from rust-lang#101171. I didn't think to look in src/bootstrap for more windows filesystem API usage, which was apparently a mistake on my part. It's kinda goofy that stuff like this is in here, but what are you gonna do, computers are awful. I also added `winbase` to the `winapi` dep -- I tested this in a tmp crate but needed to add this to your Cargo.toml -- you `use winapi::stuff::winbase` in this function, but are relying on something else turning on that feature.
Rollup of 6 pull requests Successful merges: - rust-lang#101153 (Migrate another part of rustc_infer to session diagnostic) - rust-lang#101399 (Shrink span for bindings with subpatterns.) - rust-lang#101422 (Hermit: Add File::set_time stub) - rust-lang#101455 (Avoid UB in the Windows filesystem code in... bootstrap?) - rust-lang#101498 (rustc: Parameterize `ty::Visibility` over used ID) - rust-lang#101549 (Use HashStable_Generic in rustc_type_ir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This basically a subset of the changes from #101171. I didn't think to look in src/bootstrap for more windows filesystem API usage, which was apparently a mistake on my part. It's kinda goofy that stuff like this is in here, but what are you gonna do, computers are awful.
I also added
winbase
to thewinapi
dep -- I tested this in a tmp crate but needed to add this to your Cargo.toml -- youuse winapi::stuff::winbase
in this function, but are relying on something else turning on that feature.