Skip to content

ILU/ILDL violate strict aliasing for scalar block types

To avoid that this get's silently forgotten:

When used with matrices and vectors of raw scalar types (e.g. BlockVector<double>), ILU and ILDL lead to undefined behaviour. The reason is, that they rely on toVector() and toMatrix() which both violate strict aliasing rules due to misusing the result of a reinterpret_cast. It may look like the generated code is OK, while is (depending on the optimization) silently computes with wrong numbers. Thus I consider this bug really dangerous.