$ cat a.cpp #define EIGEN_DONT_ALIGN_STATICALLY #include <Eigen/Core> int main() { Eigen::VectorXd x; x.setRandom(2); return (x + x).stableNorm(); } $ clang++ -I. a.cpp $ ./a.out a.out: ./Eigen/src/Core/MapBase.h:191: void Eigen::MapBase<Eigen::Ref<const Eigen::Matrix<double, -1, 1, 0, 4096, 1>, 16, Eigen::InnerStride<1> >, 0>::checkSanity(typename internal::enable_if<(internal::traits<T>::Alignment > 0), void *>::type) const [Derived = Eigen::Ref<const Eigen::Matrix<double, -1, 1, 0, 4096, 1>, 16, Eigen::InnerStride<1> >, Level = 0, T = Eigen::Ref<const Eigen::Matrix<double, -1, 1, 0, 4096, 1>, 16, Eigen::InnerStride<1> >]: Assertion `( ((internal::UIntPtr(m_data) % internal::traits<Derived>::Alignment) == 0) || (cols() * rows() * innerStride() * sizeof(Scalar)) < internal::traits<Derived>::Alignment ) && "data is not aligned"' failed. Aborted hg changeset: 10367:3a05a3e7b733 (HEAD as of today) OS: ubuntu 14.04 64bit Compiler: Clang 3.7.1 The code is no problem if EIGEN_DONT_ALIGN_STATICALLY is undefined or the size of 'x' is 1. It causes SegFault with debug build. This pattern appears (and fails) in NonLinearOptimization/LevenbergMarquardt.h in unsupported. Best regards, Shuntaro
Fixed: https://bitbucket.org/eigen/eigen/commits/81edfa541315/ https://bitbucket.org/eigen/eigen/commits/336312886d5f/ (3.3)
*** Bug 1429 has been marked as a duplicate of this bug. ***
-- 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/1400.