diff --git a/third_party/crabbyavif/BUILD.gn b/third_party/crabbyavif/BUILD.gn index 38b2055f5c..c9ef690b78 100644 --- a/third_party/crabbyavif/BUILD.gn +++ b/third_party/crabbyavif/BUILD.gn @@ -202,7 +202,7 @@ rust_static_library("crabbyavif") { # Required for disable_cfi feature. configs -= [ "//build/config/compiler:disallow_unstable_features" ] - rustflags = [ "-Zallow-features=sanitize" ] + rustflags = [ "-Zallow-features=no_sanitize" ] public_deps = [ ":header_files" ] deps = [ diff --git a/third_party/crabbyavif/src/src/capi/io.rs b/third_party/crabbyavif/src/src/capi/io.rs index e7994ce312..60a3c13b78 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", no_sanitize(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..a05f0a5e8b 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", feature(no_sanitize))] #[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..3f68c16f2b 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", no_sanitize(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", no_sanitize(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,