udacity / CarND-Extended-Kalman-Filter-Project

Self-Driving Car Nanodegree Program Starter Code for the Extended Kalman Filter Project
MIT License
335 stars 1.56k forks source link

Eigen members within structures need to be aligned #57

Closed jwdinius closed 6 years ago

jwdinius commented 7 years ago

I had been using Eigen with another application and noticed a recurring seg fault when trying to end the application. valgrind pointed me to a memory alignment issue within Eigen, which led me to this:

https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html

I believe that your code for all term 2 projects that use Eigen needs to include EIGEN_MAKE_ALIGNED_OPERATOR_NEW in the public members area wherever an Eigen container is declared within a struct/class.

mvirgo commented 6 years ago

As long as it's only right at the exit of the code, doesn't seem like too big of an item, but if you'd like to create a PR as an example for this project, we can look into it further for the others as well.