aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/ctorleak.cpp
Commit message (Collapse)AuthorAge
* Support manually disabling exceptionsHEADmasterGravatar Benjamin Barenblat2021-07-07
| | | | | Rename EIGEN_EXCEPTIONS to EIGEN_USE_EXCEPTIONS, and allow disabling exceptions with -DEIGEN_USE_EXCEPTIONS=0.
* check two ctorsGravatar Gael Guennebaud2018-11-23
|
* Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with ↵Gravatar Gael Guennebaud2018-07-17
| | | | | | | | | EIGEN_DECLARE_TEST(mytest) { /* code */ }. This provide several advantages: - more flexibility in designing unit tests - unit tests can be glued to speed up compilation - unit tests are compiled with same predefined macros, which is a requirement for zapcc
* Constructing a Matrix/Array with implicit transpose could lead to memory leaks.Gravatar Christoph Hertzberg2015-04-16
| | | | Also reduced code duplication for Matrix/Array constructors
* Define EIGEN_TRY, EIGEN_CATCH, EIGEN_THROW as suggested by Moritz Klammer.Gravatar Christoph Hertzberg2014-07-22
| | | | | Make it possible to run unit-tests with exceptions disabled via EIGEN_TEST_NO_EXCEPTIONS flag. Enhanced ctorleak unit-test
* Applied changes suggested by Christoph Hertzberg to c'tor leak fix.Gravatar Moritz Klammler2014-07-18
| | | | | - Enclose exception handling in '#ifdef EIGEN_EXCEPTIONS'. - Use an object counter to demonstrate the bug more readily.
* Avoid memory leak when constructor of user-defined type throws exception.Gravatar Moritz Klammler2014-07-06
The added check `ctorleak.cpp` demonstrates how the leak can be reproduced. The test appears to pass but it is leaking the storage of the (not created) matrix. I don't know how to make this test fail in the existing test suite but you can run it through Valgrind (or another debugger) to verify the leak. $ ./check.sh ctorleak && valgrind --leak-check=full ./test/ctorleak This patch fixes this leak by adding some try-catch-delete-rethrow blocks to `Eigen/src/Core/util/Memory.h`.