assigning products to traingularView does not warn for size mismatch
Submitted by Jitse Niesen
Assigned to Nobody
Link to original bugzilla bug (#784)
Version: 3.2
Description
Test code:
m1.setRandom(5,5);
m2.resize(6,6);
m2.triangularView<Lower>() = m1*m1;
MatrixXd m1, m2;This should warn that the size of m2 is different from the size of m1*m1 (unless compiled with -DNDEBUG) but it does not. Instead it produces invalid reads when run under valgrind.
Note that the product is necessary, "m2.triangularView<Lower>() = m1" without the product does produce a warning.