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_lcm_overflow fails on sparc64 #26

Open
silwol opened this issue Jul 11, 2019 · 2 comments
Open

test_lcm_overflow fails on sparc64 #26

silwol opened this issue Jul 11, 2019 · 2 comments

Comments

@silwol
Copy link

silwol commented Jul 11, 2019

The build of the Debian package of num-integer 0.1.41 failed test_lcm_overflow on sparc64, it succeeded on the other Debian architectures.
Test log can be found at https://buildd.debian.org/status/fetch.php?pkg=rust-num-integer&arch=sparc64&ver=0.1.41-1&stamp=1562827854&raw=0
The relevant output with the backtrace is:

---- test_lcm_overflow stdout ----
thread 'test_lcm_overflow' panicked at 'attempt to multiply with overflow', src/lib.rs:871:27
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::panicking::panic
   9: <u64 as num_integer::Integer>::gcd_lcm
             at src/lib.rs:871
  10: <u64 as num_integer::Integer>::lcm
             at src/lib.rs:860
  11: num_integer::test_lcm_overflow
             at src/lib.rs:1166
  12: num_integer::test_lcm_overflow::{{closure}}
             at src/lib.rs:1138
  13: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.34.2/src/libcore/ops/function.rs:231

I took a quick look at the affected code locations, but I'm not too much into the internals and bit widths of the affected integer types.

@silwol
Copy link
Author

silwol commented Jul 11, 2019

Just for the record: https://buildd.debian.org/status/package.php?p=rust-num-integer has a list of the latest build attempts for all architectures.

@cuviper
Copy link
Member

cuviper commented Jul 11, 2019

Strange that it only occurs on sparc64, and only on the last line of that test. It really seems like it's going to be a codegen issue for that target -- which would be a bug for rustc (or llvm), not here.

Can you debug-print those values that are being multiplied? (src/lib.rs:871)

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