[Bf-committers] Compilation option for Win32 causing Eigen3 unaligned array assert

Benoit Bolsee benoit.bolsee at online.be
Sun Jun 3 14:36:08 CEST 2012


There are a couple of CMakeLists.txt file in the blender project that
contain this code:
 
if(WIN32)
    add_definitions(-DEIGEN_DONT_ALIGN_STATICALLY)
endif()
 
It goes back to revision 41283 with this commit log: "Fix compilation
error for win32. That static align trick i've wrote about is still
necessary."
 
The EIGEN_DONT_ALIGN_STATICALLY compilation option disables the
automatic alignment on the stack of fixed size matrices local variables,
causing crash when SSE optimization is enabled. Currently 3 projects use
Eigen3: ikplugin, intern_itask and intern_dualcon. I've tested itasc+SSE
optimization and indeed this option is causing a crash. 
 
I don't know what compilation error the comment is refering to, but
removing the option does not cause any compilation problem in MSVC2008.
Since this option is causing a runtime crash, it should be removed. Any
reason to keep it?
 
The affected files are:
    intern\itasc\CMakeLists.txt
    source\blender\ikplugin\CMakeLists.txt
 
/benoit


More information about the Bf-committers mailing list