Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
xbt_ex_display(): do not free the exception after displaying
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 18 May 2009 08:32:17 +0000 (08:32 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 18 May 2009 08:32:17 +0000 (08:32 +0000)
This allows to do more with the given exception afterward.
Users should call xbt_ex_free() themselves.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6281 48e7efb5-ca39-0410-a469-dd3cf9ba447f

ChangeLog
src/xbt/ex.c

index e0f9f26..bda8f2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,11 @@ SimGrid (3.4-svn) unstable; urgency=high
   * Add SIMIX_process_set_name() to change the name of the current
     process in the log messages.
 
   * Add SIMIX_process_set_name() to change the name of the current
     process in the log messages.
 
+ XBT:
+  * xbt_ex_display(): do not free the exception after displaying 
+    This allows to do more with the given exception afterward.
+    Users should call xbt_ex_free() themselves. 
+
  -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr> 
 
 SimGrid (3.3) stable; urgency=high
  -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr> 
 
 SimGrid (3.3) stable; urgency=high
index 7c0714f..6ffba19 100644 (file)
@@ -112,9 +112,6 @@ void xbt_ex_display(xbt_ex_t *e)  {
           e->procname,thrower?thrower:" in this process");
   CRITICAL1("%s",e->msg);
 
           e->procname,thrower?thrower:" in this process");
   CRITICAL1("%s",e->msg);
 
-  if (thrower)
-    free(thrower);
-
   if (!e->remote && !e->bt_strings)
     xbt_ex_setup_backtrace(e);
 
   if (!e->remote && !e->bt_strings)
     xbt_ex_setup_backtrace(e);
 
@@ -132,7 +129,6 @@ void xbt_ex_display(xbt_ex_t *e)  {
   fprintf(stderr," at %s:%d:%s (no backtrace available on that arch)\n",
           e->file,e->line,e->func);
 #endif
   fprintf(stderr," at %s:%d:%s (no backtrace available on that arch)\n",
           e->file,e->line,e->func);
 #endif
-  xbt_ex_free(*e);
 }
 
 
 }