Bugzilla – Bug 1882
int64x64 tests trigger valgrind bug
Last modified: 2014-03-29 03:40:56 UTC
int64x64 test suite fails under valgrind, passes on normal builds. The failing test case is for conversions to/from double. The int64x64_t implementation uses long double internally to do the conversion. Note that many long double implementations have 64 bits (or less!) of mantissa, so it is impossible to do bit-accurate Q64.64 conversions on numbers with integer parts. The test case uses std::numeric_limits<long double>::epsilon () to tailor the expected values to the claimed numeric precision. valgrind coerces all long doubles to mere doubles: http://valgrind.org/docs/manual/manual-core.html#manual-core.limits Despite numerous requests, https://bugs.kde.org/0 the maintainer is apparently extremely reluctant to fix it. Looking for workaround.
An example valgrind failure: https://ns-buildmaster.ee.washington.edu:8010/job/Daily-with-valgrind/label=Ubuntu-64-13.10/481/consoleFull Search for "--test-name=int64x64" in the command string reported by valgrind
I'm assuming that once the patch for bug 1880 is applied, there will be no valgrind errors but there will be lingering test failures? Could the tests that trigger valgrind issues be factored out to a different test suite that is added to core_valgrind_skip_tests in test.py?
After 1880, the test with valgrind won't crash, but it will fail under valgrind. The failure occurs because valgrind changes the effective precision, without updating epsilon(). I'm looking into adjusting the expected precision if we detect valgrind, so the test will pass. (In reply to Tom Henderson from comment #2) > I'm assuming that once the patch for bug 1880 is applied, there will be no > valgrind errors but there will be lingering test failures? > > Could the tests that trigger valgrind issues be factored out to a different > test suite that is added to core_valgrind_skip_tests in test.py?
Patch r10661 06fbdb895376 http://code.nsnam.org/ns-3-dev/rev/06fbdb895376 Holding off on resolving to see buildbot valgrind error clear.
Buildbot valgrind is clear.