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

rlp - test failures on 32-bit #802

Closed
plugwash opened this issue Nov 30, 2023 · 1 comment · Fixed by #808
Closed

rlp - test failures on 32-bit #802

plugwash opened this issue Nov 30, 2023 · 1 comment · Fixed by #808

Comments

@plugwash
Copy link

Debian CI is reporting test failures for the rlp crate on 32-bit architectures. The tests in question expect errors and get errors, but the errors received are not the ones expected.

164s ---- length_overflow stdout ----
164s thread 'length_overflow' panicked at 'assertion failed: `(left == right)`
164s   left: `Err(RlpInvalidLength)`,
164s  right: `Err(RlpIsTooBig)`', tests/tests.rs:27:5

164s ---- test_rlp_list_length_overflow stdout ----
164s thread 'test_rlp_list_length_overflow' panicked at 'assertion failed: `(left == right)`
164s   left: `Err(RlpIsTooShort)`,
164s  right: `Err(RlpIsTooBig)`', tests/tests.rs:592:5
Fabian-Gruenbichler added a commit to Fabian-Gruenbichler/parity-common that referenced this issue Dec 16, 2023
the overflow behaviour depends on the width of usize, conditionalize
accordingly.

Fixes: paritytech#802

Signed-off-by: Fabian Grünbichler <[email protected]>
@Fabian-Gruenbichler
Copy link
Contributor

patch from #808 works according to Debian CI: https://ci.debian.net/packages/r/rust-rlp/testing/i386/

alternatively, the condition could also be using usize::BITS directly, feel free to adapt as you see fit - the input values should be valid for whichever check you choose ;)

ordian added a commit that referenced this issue Jan 2, 2024
the overflow behaviour depends on the width of usize, conditionalize
accordingly.

Fixes: #802

Signed-off-by: Fabian Grünbichler <[email protected]>
Co-authored-by: ordian <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants