]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid accessing uninitialized memory in TaskInfo 6626/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 18 May 2018 07:48:43 +0000 (09:48 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 18 May 2018 07:48:43 +0000 (09:48 +0200)
source/matrix_free/task_info.cc

index 8169b59a58f0730453d8fcf23545395096fd9a4b..01f48a99588e65d5ba72c34653253eddae92c0ea 100644 (file)
@@ -774,7 +774,7 @@ namespace internal
           // create a tight map of categories for not taking exceeding amounts
           // of memory below. Sort the new categories by the numbers in the
           // old one.
-          tight_category_map.reserve(n_active_cells+n_ghost_cells);
+          tight_category_map.resize(n_active_cells+n_ghost_cells);
           std::set<unsigned int> used_categories;
           for (unsigned int i=0; i<n_active_cells+n_ghost_cells; ++i)
             used_categories.insert(cell_vectorization_categories[i]);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.