[eigen] cwiseop_1 test failure |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Hello,
I had a quick look at the cwiseop_1 test, which according to the dash
board fails on both Gael's and my computer but only with GCC 4.3.
I did not get very far and I have other commitments at the moment (and
I've also run out of ideas), but perhaps somebody can continue from here.
The offending line is
VERIFY_IS_APPROX(m4.setConstant(s1), m3);
Here, m3 and m4 are of type MatrixType = Matrix<1,1,float>, s1 is a random
float, and m3 is set to MatrixType::Constant(1,1,s1).
I did not manage to get an self-contained test case, though given more
time this should be possible.
valgrind reports:
Use of uninitialised value of size 4
at 0x804A35F: bool Eigen::test_ei_isApprox<Eigen::Matrix<float, 1, 1, 0, 1, 1>, Eigen::Matrix<float, 1, 1, 0, 1, 1> >(Eigen::Matrix<float, 1, 1, 0, 1, 1> const&, Eigen::Matrix<float, 1, 1, 0, 1, 1> const&) (in .../cwiseop_1)
by 0x804AE1E: void cwiseops<Eigen::Matrix<float, 1, 1, 0, 1, 1> >(Eigen::Matrix<float, 1, 1, 0, 1, 1> const&) (in .../cwiseop_1)
by 0x8049DB9: test_cwiseop() (in .../cwiseop_1)
by 0x804A0EA: main (in .../cwiseop_1)
The error persists if I replace
VERIFY_IS_APPROX(m4.setConstant(s1), m3);
by
VERIFY(test_ei_isApprox(m4.setConstant(s1), m3));
However, the error goes away if I replace it by
VERIFY(m4.setConstant(s1).isApprox(m3, test_precision<typename MatrixType::Scalar>()));
As far as I see, this is just inlining the definition of test_ei_isApprox,
so I don't see why this makes a difference.
Jitse