[Pkg-rust-maintainers] Bug#950583: rustc: Float number min() and max() methods on mips[64]el behave different from other architectures

Wolfgang Silbermayr wolfgang at silbermayr.at
Mon Feb 3 20:23:39 GMT 2020


Package: rustc
Version: 1.40.0+dfsg1-5
Severity: normal

Dear Maintainer,

When calling the f64 and f32 min() and max() methods on mips[64]el, with one of
the numbers being NAN, the returned value is also NAN. On all other
architectures we have, the non-NAN number gets returned.

The following test reproducibly yields an error on the mips* architectures
while succeeding on the others.

```rust
#[cfg(test)]
mod tests {
    #[test]
    fn min() {
        assert_eq!(1f64.min(std::f64::NAN), 1f64);
    }

    #[test]
    fn max() {
        assert_eq!(1f64.max(std::f64::NAN), 1f64);
    }
}
```



-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages rustc depends on:
ii  binutils              2.33.90.20200122-2
ii  gcc                   4:9.2.1-3.1
ii  libc6                 2.29-9
ii  libc6-dev [libc-dev]  2.29-9
ii  libgcc-s1 [libgcc1]   10-20200117-2
ii  libgcc1               1:9.2.1-25
ii  libllvm9              1:9.0.1-8
ii  libstd-rust-dev       1.40.0+dfsg1-5
ii  libstdc++6            9.2.1-25

Versions of packages rustc recommends:
ii  cargo     0.40.0-3
ii  rust-gdb  1.40.0+dfsg1-5

Versions of packages rustc suggests:
pn  lld-9     <none>
pn  rust-doc  <none>
pn  rust-src  <none>

-- no debconf information



More information about the Pkg-rust-maintainers mailing list