[Boost-bugs] [Boost C++ Libraries] #13247: test_independent_bits32 fails unit test in release mode only at -O2 and higher under clang 3.8, 3.9, 4.0, 5.0

Subject: [Boost-bugs] [Boost C++ Libraries] #13247: test_independent_bits32 fails unit test in release mode only at -O2 and higher under clang 3.8, 3.9, 4.0, 5.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-08 04:13:39


#13247: test_independent_bits32 fails unit test in release mode only at -O2 and
higher under clang 3.8, 3.9, 4.0, 5.0
--------------------------------+---------------------------
 Reporter: James E. King, III | Owner: No-Maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: |
--------------------------------+---------------------------
 I'm working on adding CI support to Boost.Random and I found that the
 clang build jobs are failing on this test as follows. To reproduce, use
 Boost.Random from the test directory with ubuntu zesty and clang 4.0:

 {{{
 passes:
 ../../../b2 toolset=clang variant=release test_independent_bits32 clean
 ../../../b2 toolset=clang variant=release cxxflags="-O0"
 test_independent_bits32

 passes:
 ../../../b2 toolset=clang variant=release test_independent_bits32 clean
 ../../../b2 toolset=clang variant=release cxxflags="-O1"
 test_independent_bits32

 fails:
 ../../../b2 toolset=clang variant=release test_independent_bits32 clean
 ../../../b2 toolset=clang variant=release cxxflags="-O2"
 test_independent_bits32
 }}}

 No versions of gcc at any optimization level seem to fail and ubsan
 testing also does not fail (but it is a debug build) so this needs further
 investigation to understand if it is a clang optimizer bug that's been
 around for a while or if the test is wrong for clang somehow.

 {{{
 testing.capture-output
 bin.v2/libs/random/test/test_independent_bits32.test/clang-gnu-
 linux-3.9.0/release/threadapi-pthread/test_independent_bits32.run
 ====== BEGIN OUTPUT ======
 Running 13 test cases...
 libs/random/test/test_generator.ipp(246): error: in "validate": check
 urng() == 4123659995U has failed [0 != 4123659995]
 libs/random/test/test_generator.ipp(256): error: in "validate_seed_seq":
 check urng() == 666528879U has failed [0 != 666528879]
 libs/random/test/test_generator.ipp(268): error: in "validate_iter": check
 urng() == 3408548740U has failed [0 != 3408548740]
 libs/random/test/test_generator.ipp(278): error: in "test_generate": check
 { actual, actual + N } == { expected, expected + N } has failed.
 Mismatch at position 0: 0 != 3499211612
 Mismatch at position 1: 0 != 581869302
 Mismatch at position 2: 0 != 3890346734
 Mismatch at position 3: 0 != 3586334585
 *** 4 failures are detected in the test module "Master Test Suite"
 EXIT STATUS: 201
 ====== END OUTPUT ======
 ...failed testing.capture-output
 bin.v2/libs/random/test/test_independent_bits32.test/clang-gnu-
 linux-3.9.0/release/threadapi-pthread/test_independent_bits32.run...
 }}}

 {{{
 testing.capture-output
 bin.v2/libs/random/test/test_independent_bits32.test/clang-gnu-
 linux-5.0.1/release/threadapi-pthread/test_independent_bits32.run
 ====== BEGIN OUTPUT ======
 Running 13 test cases...
 libs/random/test/test_generator.ipp(246): error: in "validate": check
 urng() == 4123659995U has failed [0 != 4123659995]
 libs/random/test/test_generator.ipp(256): error: in "validate_seed_seq":
 check urng() == 666528879U has failed [0 != 666528879]
 libs/random/test/test_generator.ipp(268): error: in "validate_iter": check
 urng() == 3408548740U has failed [0 != 3408548740]
 libs/random/test/test_generator.ipp(278): error: in "test_generate": check
 { actual, actual + N } == { expected, expected + N } has failed.
 Mismatch at position 0: 0 != 3499211612
 Mismatch at position 1: 0 != 581869302
 Mismatch at position 2: 0 != 3890346734
 Mismatch at position 3: 0 != 3586334585
 *** 4 failures are detected in the test module "Master Test Suite"
 EXIT STATUS: 201
 ====== END OUTPUT ======
 ...failed testing.capture-output
 bin.v2/libs/random/test/test_independent_bits32.test/clang-gnu-
 linux-5.0.1/release/threadapi-pthread/test_independent_bits32.run...
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13247>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-10-08 04:19:16 UTC