Uh oh!
There was an error while loading. Please reload this page.
Avoid UB in the Windows filesystem code in... bootstrap? - #101455
Merged
Conversation
rust-highfive
commented
Sep 5, 2022
Contributor
(rust-highfive has picked a reviewer for you, use r? to override) |
jyn514
approved these changes
Sep 7, 2022
jyn514
left a comment
Member
There was a problem hiding this comment.
this seems fine, yeah. r=me if you want.
Is there no safe way to make a symlink on windows??
ChrisDenton
commented
Sep 7, 2022
Member
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. |
thomcc
commented
Sep 7, 2022
MemberAuthor
@bors r=jyn514 |
bors
commented
Sep 7, 2022
Collaborator
Dylan-DPC added a commit
to Dylan-DPC/rust
that referenced
this pull request
Sep 7, 2022
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.
Dylan-DPC added a commit
to Dylan-DPC/rust
that referenced
this pull request
Sep 7, 2022
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.
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 8, 2022
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
winbaseto thewinapidep -- I tested this in a tmp crate but needed to add this to your Cargo.toml -- youuse winapi::stuff::winbasein this function, but are relying on something else turning on that feature.