From: Timo Heister Date: Mon, 21 Dec 2015 05:42:56 +0000 (-0500) Subject: fix uninitialized members in SparseMatrixEZ X-Git-Tag: v8.4.0-rc2~143^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6756084cef1fdb0dbf3fa52dba6133c5bcc29d55;p=dealii.git fix uninitialized members in SparseMatrixEZ An uninitialized member would cause random crashes in tests/lac/sparse_matrices_ez as documented by valgrind: ==31301== Conditional jump or move depends on uninitialised value(s) ==31301== at 0xB0C4614: dealii::SparseMatrixEZ::reinit(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) (stl_vector.h:666) ==31301== by 0x40F45C: main (sparse_matrix_ez.h:1400) --- diff --git a/include/deal.II/lac/sparse_matrix_ez.h b/include/deal.II/lac/sparse_matrix_ez.h index 153b5a8ede..131fd5b453 100644 --- a/include/deal.II/lac/sparse_matrix_ez.h +++ b/include/deal.II/lac/sparse_matrix_ez.h @@ -86,7 +86,7 @@ template class FullMatrix; * If the rows are expected to be filled more or less from first to last, * using a @p default_row_length of zero may not be such a bad idea. * - * The name of this matrix is in reverence to a publication of the Internal + * The name of this matrix is in reference to a publication of the Internal * Revenue Service of the United States of America. I hope some other aliens * will appreciate it. By the way, the suffix makes sense by pronouncing it * the American way. diff --git a/include/deal.II/lac/sparse_matrix_ez.templates.h b/include/deal.II/lac/sparse_matrix_ez.templates.h index bacd822d5c..db928932d3 100644 --- a/include/deal.II/lac/sparse_matrix_ez.templates.h +++ b/include/deal.II/lac/sparse_matrix_ez.templates.h @@ -31,9 +31,10 @@ DEAL_II_NAMESPACE_OPEN template SparseMatrixEZ::SparseMatrixEZ() -{ - n_columns = 0; -} + : n_columns (0), + increment (1), + saved_default_row_length (0) +{} template