Registered Member
|
Hello All,
I am running the latest stable Eigen release (from the eigen-2.0.0.tar.bz2 tarball) under Ubuntu 8.10 and compiling with gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12). In the process of locating a memory leak in a program I am working with, I ran the program under valgrind and triggered the following assertion:
I read over the suggestions at http://eigen.tuxfamily.org/dox/Unaligne ... ssert.html and the thread at -solved-unaligned- ... 30974.html, but have been unable to resolve the issue. Here is the simplest reproduction of the problem I could come up with:
When I compile (g++ -IEigen/ test.cpp -o test) and run (valgrind ./test) the above code, I trigger the unaligned array assertion. Playing around with the above code, I can eliminate the assertion by doing any of the following: 1) Changing the Matrix in member_function() and member_matrix to the same dimensions 2) Not calling test_object.member_function() before pushing test_object 3) Eliminating the local_vector.resize call 4) Eliminating the member_matrix matrix Am I using the library wrong, are there any obvious mistakes in the above code, or am I simply not going to be able to use valgrind in this situation (the assertion is not tripped when I run the program outside of valgrind)? Thank you for your advice. To the developers of Eigen, great job! Working with the Eigen has been a pleasure! |
Moderator
|
using a custom class with Eigen objects as attributes within std::vector does not work with last stable version. This has been fixed in trunk. I did not backported it into the stable branch yet because it is a relatively big change, and it has not been much tested. So could you try with svn trunk ?
|
Registered Member
|
I just compiled the code I posted with the svn trunk, and the program ran under valgrind without issue. Thank you for the assistance!
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell