Created attachment 339 [details] Code to reproduce problem Assigning a SparseVector (which seems to be more a SparseColVector) to a dense row-vector fails. The same works for dense to dense assignments. Valgrind reports: ==29380== Invalid write of size 8 ==29380== at 0x804E5A0: void Eigen::SparseMatrixBase<Eigen::SparseVector<double, 0, int> >::evalTo<Eigen::Matrix<double, 1, -1, 1, 1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> >&) const (SparseMatrixBase.h:423) ==29380== by 0x804EE53: Eigen::Matrix<double, 1, -1, 1, 1, -1>& Eigen::MatrixBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> >::operator=<Eigen::SparseVector<double, 0, int> >(Eigen::EigenBase<Eigen::SparseVector<double, 0, int> > const&) (Assign.h:569) ==29380== by 0x804A4F4: main (test.cpp:21) ==29380== Address 0x4339180 is 0 bytes after a block of size 32 alloc'd ==29380== at 0x4027416: memalign (vg_replace_malloc.c:581) ==29380== by 0x4027473: posix_memalign (vg_replace_malloc.c:709) ==29380== by 0x804C6EF: Eigen::internal::aligned_malloc(unsigned int) (Memory.h:204) ==29380== by 0x804D290: void* Eigen::internal::conditional_aligned_malloc<true>(unsigned int) (Memory.h:283) ==29380== by 0x804E17D: double* Eigen::internal::conditional_aligned_new_auto<double, true>(unsigned int) (Memory.h:403) ==29380== by 0x804C884: Eigen::DenseStorage<double, -1, 1, -1, 1>::DenseStorage(int, int, int) (DenseStorage.h:237) ==29380== by 0x804F16A: Eigen::PlainObjectBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> >::PlainObjectBase(int, int, int) (in /home/wern_al/a.out) ==29380== by 0x80497CB: main (test.cpp:13) ==29380==
thanks for the report. https://bitbucket.org/eigen/eigen/commits/27bf0b24cf67/ Changeset: 27bf0b24cf67 User: ggael Date: 2013-06-10 00:06:40 Summary: Fix bug 607: handle implicit transposition from sparse vector to dense vector
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/607.