-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix unsoundness in bootstrap cache code #105624
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
02519f7
to
d8d84d8
Compare
d8d84d8
to
675fa0b
Compare
let l = T::intern_cache().lock().unwrap(); | ||
unsafe { mem::transmute::<&U, &'static U>(l.get(*self).as_ref()) } | ||
unsafe { mem::transmute::<&U, &U>(l.get(*self).as_ref()) } |
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.
We still need to unsafely transmute the lifetime from the temporary borrow on this line to the &self
lifetime in the signature.
@bors r+ I want to rip out all this interning code at some point and use a library instead, but this a good change in the meantime, thanks. |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#105399 (Use more LFS functions.) - rust-lang#105578 (Fix transmutes between pointers in different address spaces (e.g. fn ptrs on AVR)) - rust-lang#105598 (explain mem::forget(env_lock) in fork/exec) - rust-lang#105624 (Fix unsoundness in bootstrap cache code) - rust-lang#105630 (Add a test for rust-lang#92481) - rust-lang#105684 (Improve rustdoc markdown variable naming) - rust-lang#105697 (Remove fee1-dead from reviewers) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I guess it missed the mark and the nomination can probably be now deleted @rustbot label -stable-nominated |
I'm unilaterally approving this for stable backport, to ensure it gets into the next point release for 1.67. @rustbot label: stable-accepted |
…crum Release 1.67.1 - Revert back to LlvmArchiveBuilder on all platforms rust-lang#107360 - 🚨 fix unsoundness in bootstrap cache code rust-lang#105624 - Mark uninlined_format_args as pedantic rust-lang/rust-clippy#10265 - Revert "switch to the macos-12-xl builder" rust-lang#107574 r? `@Mark-Simulacrum`
Pkgsrc changes: * checksums only. Upstream changes: Version 1.67.1 (2023-02-09) =========================== - [Fix interoperability with thin archives.] (rust-lang/rust#107360) - [Fix an internal error in the compiler build process.] (rust-lang/rust#105624) - [Downgrade `clippy::uninlined_format_args` to pedantic.] (rust-lang/rust-clippy#10265)
Discovered via #105575, which showed that rustc was failing to build during a perf run.