Skip to content

regression: unit test coretest::num::test_i32f64 fails on some targets #36518

Closed
@japaric

Description

@japaric

Found using smoke.

Affected targets:

  • arm-unknown-linux-gnueabi
  • mips-unknown-linux-musl
  • mipsel-unknown-linux-musl

STR

# NOTE assumes transparent QEMU emulation

$ rustup component add rust-src

$ rustc \
    --crate-name coretest \
    --target $TARGET \
    --test \
    $(rustc --print sysroot)/lib/rustlib/src/rust/src/libcoretest/lib.rs

$ ./coretest

Output

$ ./coretest

(..)

failures:

---- num::test_i32f64 stdout ----

    thread 'num::test_i32f64' panicked at 'assertion failed: `(left == right)` (left: `-536870912`, right: `-2147483648`)', /home/travis/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcoretest/num/mod.rs:162

failures:

    num::test_i32f64

test result: FAILED. 591 passed; 1 failed; 2 ignored; 0 measured

Comments

  • This test passes if the crate is compiled with optimizations (-O) enabled.
  • This test passes if compiled with the nightly from 2016-09-13.
  • Given that this test passed two days ago and the list of affected targets, IMO the prime suspect
    is the recent change related to compiler-rt intrinsics: crate-ify compiler-rt into compiler-builtins #35021. Because this test is likely to
    involve some compiler-rt intrinsic for the affected targets (no FPU).
  • Disclaimer: This test was executed under QEMU. There is a chance this is actually a QEMU
    bug/failure.

Meta

$ rustc -V
rustc 1.13.0-nightly (6ffdda1ba 2016-09-14)

cc @alexcrichton @brson

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions