Skip to content

Eigen crash for SparseMatrix when using conservativeResize and block expressions

Submitted by Clemens Hofreither

Assigned to Nobody

Link to original bugzilla bug (#563)
Version: 3.2

Description

The following code segfaults on the latest Eigen development branch:

////////////////////////////////////////////////////////

#include <Eigen/Sparse>

using namespace Eigen;

int main()
{
SparseMatrix<double> A(3, 3);
for (int i = 0; i < 3; ++i)
A.insert(i,i) = 1.0;

A.conservativeResize(3, 4);  

A.col(3) = A.col(2);  

}

////////////////////////////////////////////////////////

I understand this is still beta-level functionality, so take this bug report as you will.

Blocking

#387 (closed)

Edited by Eigen Bugzilla