ITADN

resb/zoneinfo64 soundness: relies on tuple layout of (i32, i32)

#8007OpenManishearth 创建于 2026-05-29
A-safety
M
Manishearthcommented
https://github.com/unicode-org/icu4x/blob/b7c3aa954b8fb7fcf57957bf67d23509ae83023e/utils/resb/src/binary/helpers.rs#L82-L83 This isn't valid. We really need to stop making assumptions about Rust tuple layouts where we don't need to. This crate should be written to work with either `[i32; 2]` or `#[repr(C)] struct I32Pair`. I didn't go ahead and fix this because this is public API on resb and affects zoneinfo64. Marking as tech debt priority, we should fix safety issues as we find them. cc @sffc @robertbastian
0 条评论