From 3db20c8434717cdc3ce33f94cafbaeec6fcc0e4e Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 20 Sep 2025 14:43:07 -0400 Subject: old rust? --- .../files/chromium-142-crabbyavif-rust18x.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch (limited to 'www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch') diff --git a/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch b/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch new file mode 100644 index 0000000..164e31f --- /dev/null +++ b/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch @@ -0,0 +1,48 @@ +diff --git a/third_party/crabbyavif/src/src/capi/io.rs b/third_party/crabbyavif/src/src/capi/io.rs +index e7994ce312..cb2f3cb578 100644 +--- a/third_party/crabbyavif/src/src/capi/io.rs ++++ b/third_party/crabbyavif/src/src/capi/io.rs +@@ -207,7 +207,7 @@ impl Drop for avifIOWrapper { + } + + impl crate::decoder::IO for avifIOWrapper { +- #[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))] ++ #[cfg_attr(feature = "disable_cfi")] + fn read(&mut self, offset: u64, size: usize) -> AvifResult<&[u8]> { + // SAFETY: Calling into a C function. + let res = unsafe { +diff --git a/third_party/crabbyavif/src/src/lib.rs b/third_party/crabbyavif/src/src/lib.rs +index 90fa411889..8dc9bf2066 100644 +--- a/third_party/crabbyavif/src/src/lib.rs ++++ b/third_party/crabbyavif/src/src/lib.rs +@@ -13,7 +13,7 @@ + // limitations under the License. + + #![deny(unsafe_op_in_unsafe_fn)] +-#![cfg_attr(feature = "disable_cfi", feature(sanitize))] ++#![cfg_attr(feature = "disable_cfi")] + + #[macro_use] + mod internal_utils; +diff --git a/third_party/crabbyavif/src/src/reformat/libyuv.rs b/third_party/crabbyavif/src/src/reformat/libyuv.rs +index 9df874ccf7..cb25214914 100644 +--- a/third_party/crabbyavif/src/src/reformat/libyuv.rs ++++ b/third_party/crabbyavif/src/src/reformat/libyuv.rs +@@ -372,7 +372,7 @@ fn find_conversion_function( + // Returns Ok(Some(false)) if only YUV was converted and alpha + // needs to be imported separately. + // Returns Ok(None) if the conversion is not implemented. +-#[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))] ++#[cfg_attr(feature = "disable_cfi")] + pub(crate) fn yuv_to_rgb(image: &image::Image, rgb: &mut rgb::Image) -> AvifResult> { + if (rgb.depth != 8 && rgb.depth != 10) || !image.depth_valid() { + return Ok(None); // Not implemented. +@@ -833,7 +833,7 @@ fn rgb_to_yuv_conversion_function( + } + } + +-#[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))] ++#[cfg_attr(feature = "disable_cfi")] + pub(crate) fn rgb_to_yuv(rgb: &rgb::Image, image: &mut image::Image) -> AvifResult> { + let conversion_function = match rgb_to_yuv_conversion_function(rgb, image) { + Some(conversion_function) => conversion_function, -- cgit v1.2.3