Re: [eigen] memory error |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
I compiled a C++ program with gcc and the options-fsanitize=address -fsanitize=undefinedI get following while running/home/mathieu/opt/eigen/Eigen/src/Core/util/Memory.h:580:5: runtime error: null pointer passed as argument 1, which is declared to never be null The relevant code istemplate<typename T> struct smart_copy_helper<T,true> {EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target){ memcpy(target, start, std::ptrdiff_t(end)-std::ptrdiff_t(start)); } };The fact is that yes I have matrices which are empty. I have some structlooking likestruct {bool IsSpherical;Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> LON, LAT;Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> X, Y;};So, some arrays can be empty and some others not. But the struct iscopied.Mathieu
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |