Skip to content

fix: copied proc-macros not being cleaned up on exit #18660

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

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Dec 11, 2024

No description provided.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 11, 2024
@Veykril Veykril changed the title fix: Unload proc-macro dlls on changed timestamp fix: copied proc-macros not being cleaned up on exit Dec 11, 2024
Copy link
Member Author

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can anyone inform me about what's unsafe about https://docs.rs/memmap/latest/memmap/struct.Mmap.html#method.map, given the docs don't state it?

@lnicola
Copy link
Member

lnicola commented Dec 12, 2024

Is that the right crate? I suspect it's because another process can truncate or change the file while you're reading from it. See also https://docs.rs/memmap2/latest/memmap2/struct.Mmap.html#safety.

@Veykril
Copy link
Member Author

Veykril commented Dec 12, 2024

Ah okay, so I was right. That means technically our usages are unsound ... is there even a need for memory mapping here? We only access parts of the file anyways and its not a lot of files we are touching either

Ah I see, you added that in #4004 due to memory usage

@Veykril Veykril added this pull request to the merge queue Dec 12, 2024
Merged via the queue into rust-lang:master with commit a8efb13 Dec 12, 2024
@Veykril Veykril deleted the push-snumrtvzwqvw branch December 12, 2024 12:24
@lnicola
Copy link
Member

lnicola commented Dec 16, 2024

I'm not to worried about the memory maps causing a crash. I think there's a very small window when we have the library mapped, but not loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants