This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 681 - Uninitialised value in CholmodSupport may lead to incorrect results
Summary: Uninitialised value in CholmodSupport may lead to incorrect results
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Cholesky (show other bugs)
Version: 3.2
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-16 13:24 UTC by mcz
Modified: 2019-12-04 12:42 UTC (History)
3 users (show)



Attachments
Fixed CholmodSupport.h file (19.83 KB, text/x-chdr)
2013-10-16 13:24 UTC, mcz
no flags Details

Description mcz 2013-10-16 13:24:03 UTC
Created attachment 386 [details]
Fixed CholmodSupport.h file

When using Cholmod* classes (CholmodSupport/CholmodSupport.h), I sometimes got incorrect results (depending on solver object initialisation). After checking with valgrind, I've noticed that the solver uses uninitialised values, which should default to zero. If I was lucky enough, they were zero indeed, leading to correct results.

The above-mentioned uninitialised values are:
RealScalar m_shiftOffset[2] field in CholmodBase class, which is only initialised in the second constructor, but not in the default one - CholmodBase()

res.z and res.nz fields in the first viewAsCholmod() function:
template<typename _Scalar, int _Options, typename _Index>
cholmod_sparse viewAsCholmod(SparseMatrix<_Scalar,_Options,_Index>& mat)

I attach the fixed CholmodSupport.h file (based on 3.2.0 stable release).


Thank you for creating such a great tool!
Michael
Comment 1 Christoph Hertzberg 2013-10-17 00:11:34 UTC
Thanks for the report. Fixed in default and 3.2:
https://bitbucket.org/eigen/eigen/commits/f9490fb8eb1efa1fa08b5bc62e8888cf0eb89cfe
Comment 2 Nobody 2019-12-04 12:42:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/681.

Note You need to log in before you can comment on or make changes to this bug.