Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failure on 32-bit. #284

Open
plugwash opened this issue Mar 13, 2025 · 2 comments
Open

test failure on 32-bit. #284

plugwash opened this issue Mar 13, 2025 · 2 comments

Comments

@plugwash
Copy link

After updating the h3 crate in Debian I discovered that tests fail on 32-bit systems.

---- qpack::prefix_int::test::codec_5_bits stdout ----
thread 'qpack::prefix_int::test::codec_5_bits' panicked at src/qpack/prefix_int.rs:101:67:
called `Result::unwrap()` on an `Err` value: Overflow

---- qpack::prefix_int::test::codec_8_bits stdout ----
thread 'qpack::prefix_int::test::codec_8_bits' panicked at src/qpack/prefix_int.rs:101:67:
called `Result::unwrap()` on an `Err` value: Overflow

Digging into the git history I found that the encode and decode functions previously used usize and were changed to use u64 instead of usize ( #223 ) however the value of MAX_POWER was not changed and as a result decoding large numbers still fails.

I believe the correct fix is to use the same MAX_POWER value on all targets and intend to implement that in Debian, but feedback would be appreciated.

@seanmonstar
Copy link
Member

Your fix sounds right to me. Want to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants