commit: f666b359a91dfc9af71e72482a22619c0d726c14 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> AuthorDate: Sat Jan 28 19:29:26 2023 +0000 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> CommitDate: Sat Jan 28 19:33:53 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f666b359
dev-lang/rust: fix 1.67.0 selfbootstrap Closes: https://bugs.gentoo.org/892369 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> dev-lang/rust/files/1.67.0-bootstrap.patch | 38 ++++++++++++++++++++++++++++++ dev-lang/rust/rust-1.67.0.ebuild | 1 + 2 files changed, 39 insertions(+) diff --git a/dev-lang/rust/files/1.67.0-bootstrap.patch b/dev-lang/rust/files/1.67.0-bootstrap.patch new file mode 100644 index 000000000000..eb160661a2c2 --- /dev/null +++ b/dev-lang/rust/files/1.67.0-bootstrap.patch @@ -0,0 +1,38 @@ +From 675fa0b3dd5fe14b43ad5b7862f4528df7322468 Mon Sep 17 00:00:00 2001 +From: Michael Goulet <[email protected]> +Date: Mon, 12 Dec 2022 18:29:33 +0000 +Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20fix=20unsoundness=20in=20bootstr?= + =?UTF-8?q?ap=20cache=20code?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + src/bootstrap/cache.rs | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/bootstrap/cache.rs b/src/bootstrap/cache.rs +index be5c9bb078808..05f25af68ea8f 100644 +--- a/src/bootstrap/cache.rs ++++ b/src/bootstrap/cache.rs +@@ -89,16 +89,16 @@ impl<T: Internable + Hash> Hash for Interned<T> { + + impl<T: Internable + Deref> Deref for Interned<T> { + type Target = T::Target; +- fn deref(&self) -> &'static Self::Target { ++ fn deref(&self) -> &Self::Target { + let l = T::intern_cache().lock().unwrap(); +- unsafe { mem::transmute::<&Self::Target, &'static Self::Target>(l.get(*self)) } ++ unsafe { mem::transmute::<&Self::Target, &Self::Target>(l.get(*self)) } + } + } + + impl<T: Internable + AsRef<U>, U: ?Sized> AsRef<U> for Interned<T> { +- fn as_ref(&self) -> &'static U { ++ fn as_ref(&self) -> &U { + 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()) } + } + } + diff --git a/dev-lang/rust/rust-1.67.0.ebuild b/dev-lang/rust/rust-1.67.0.ebuild index c534fb40bb83..095c3d5689e0 100644 --- a/dev-lang/rust/rust-1.67.0.ebuild +++ b/dev-lang/rust/rust-1.67.0.ebuild @@ -163,6 +163,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc PATCHES=( "${FILESDIR}"/1.65.0-ignore-broken-and-non-applicable-tests.patch "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch + "${FILESDIR}"/1.67.0-bootstrap.patch ) S="${WORKDIR}/${MY_P}-src"
