-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
http::header::content_length::tests::good_header failed on Debian CI for the 32-bit architecture.
https://ci.debian.net/data/autopkgtest/testing/i386/r/rust-actix-web/65570123/log.gz
7878s thread 'http::header::content_length::tests::good_header' panicked at src/http/header/content_length.rs:219:9:
7878s called `Result::unwrap()` on an `Err` value: Header
7878s stack backtrace:
7878s 0: __rustc::rust_begin_unwind
7878s at /usr/src/rustc-1.89.0/library/std/src/panicking.rs:697:5
7878s 1: core::panicking::panic_fmt
7878s at /usr/src/rustc-1.89.0/library/core/src/panicking.rs:75:14
7878s 2: core::result::unwrap_failed
7878s at /usr/src/rustc-1.89.0/library/core/src/result.rs:1761:5
7878s 3: core::result::Result<T,E>::unwrap
7878s at /usr/src/rustc-1.89.0/library/core/src/result.rs:1167:23
7878s 4: actix_web::http::header::content_length::tests::assert_parse_eq
7878s at ./src/http/header/content_length.rs:164:35
7878s 5: actix_web::http::header::content_length::tests::good_header
7878s at ./src/http/header/content_length.rs:219:9
7878s 6: actix_web::http::header::content_length::tests::good_header::{{closure}}
7878s at ./src/http/header/content_length.rs:205:21
7878s 7: core::ops::function::FnOnce::call_once
7878s at /usr/src/rustc-1.89.0/library/core/src/ops/function.rs:250:5
7878s 8: core::ops::function::FnOnce::call_once
7878s at /usr/src/rustc-1.89.0/library/core/src/ops/function.rs:250:5
7878s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
When I tried to reproduce locally it failed to even build the test.
error: literal out of range for `usize`
--> src/http/header/content_length.rs:221:27
|
221 | ContentLength(18_446_744_073_709_551_615),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the literal `18_446_744_073_709_551_615` does not fit into the type `usize` whose range is `0..=4294967295`
= note: `#[deny(overflowing_literals)]` on by default
For now, in Debian I'm going to add a patch to skip that testcase on 32-bit architectures, but I'm wondering if the ContentLength field type should be using usize in the first place. Requests and responses larger than system ram are not necessarily unreasonable.
robjtede