hash in test time_zones::names::test_compute_bcp47_ids_hash is not stable over architectures
This test seems to give different result on different machine architectures, on i386 and armhf:
```
1013s
1013s thread 'time_zones::names::test_compute_bcp47_ids_hash' (19032) panicked at src/time_zones/names.rs:146:5:
1013s assertion `left == right` failed
1013s left: 7305464005179878320
1013s right: 2080308884639987833
1013s stack backtrace:
1013s 0: __rustc::rust_begin_unwind
1013s at /usr/src/rustc-1.95.0/library/std/src/panicking.rs:689:5
1013s 1: core::panicking::panic_fmt
1013s at /usr/src/rustc-1.95.0/library/core/src/panicking.rs:80:14
1013s 2: core::panicking::assert_failed_inner
1013s 3: core::panicking::assert_failed::<u64, u64>
1013s at /usr/src/rustc-1.95.0/library/core/src/panicking.rs:394:5
1013s 4: icu_provider_source::time_zones::names::test_compute_bcp47_ids_hash
1013s at /usr/share/cargo/registry/icu-provider-source-2.2.0/src/time_zones/names.rs:146:5
1013s 5: icu_provider_source::time_zones::names::test_compute_bcp47_ids_hash::{{closure}}
1013s at /usr/share/cargo/registry/icu-provider-source-2.2.0/src/time_zones/names.rs:135:33
1013s 6: core::ops::function::FnOnce::call_once
1013s at /usr/src/rustc-1.95.0/library/core/src/ops/function.rs:250:5
1013s 7: <fn() -> core::result::Result<(), alloc::string::String> as core::ops::function::FnOnce<()>>::call_once
1013s at /usr/src/rustc-1.95.0/library/core/src/ops/function.rs:250:5
1013s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
full log: https://ci.debian.net/data/autopkgtest/testing/i386/r/rust-icu-provider-source/74267524/log.gz
Typically these kind of problems happens because there is an usize as input to the hashing function, and those have different lengths on 32-bit platforms.
0 条评论