]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Initialize member variables in class ExceptionBase. 3496/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 7 Nov 2016 20:28:51 +0000 (13:28 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 7 Nov 2016 20:28:51 +0000 (13:28 -0700)
source/base/exceptions.cc

index c10f3baeb9c80d0e60d5489234c6ad61ee63c583..d92ef55dd3ace31b3bab7f214a3c6695bb8c0ca1 100644 (file)
@@ -70,7 +70,12 @@ ExceptionBase::ExceptionBase ()
   stacktrace (NULL),
   n_stacktrace_frames (0),
   what_str("")
-{}
+{
+#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
+  for (unsigned int i=0; i<sizeof(raw_stacktrace)/sizeof(raw_stacktrace[0]); ++i)
+    raw_stacktrace[0] = NULL;
+#endif
+}
 
 
 
@@ -84,7 +89,12 @@ ExceptionBase::ExceptionBase (const ExceptionBase &exc)
   stacktrace (NULL), // don't copy stacktrace to avoid double de-allocation problem
   n_stacktrace_frames (0),
   what_str("") // don't copy the error message, it gets generated dynamically by what()
-{}
+{
+#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE
+  for (unsigned int i=0; i<sizeof(raw_stacktrace)/sizeof(raw_stacktrace[0]); ++i)
+    raw_stacktrace[0] = NULL;
+#endif
+}
 
 
 

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.