From: mquinson Date: Tue, 11 Apr 2006 11:59:16 +0000 (+0000) Subject: only dupplicate the procname when dealing with remote processes; cleanup the free... X-Git-Tag: v3.3~3242 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c9a602a7aff1f69593c1606c535eb167677b8395?hp=3c0619f4774180c94441d53b01f34257ad0853fa only dupplicate the procname when dealing with remote processes; cleanup the free function so that things won't get reused from one time to the other (since it causes bad segfaults) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2116 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/xbt/ex.h b/include/xbt/ex.h index 597ce19917..457047b073 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -411,18 +411,19 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e); */ #define _THROW(c,v,m) \ - do { /* change this sequence into one block */ \ - /* build the exception */ \ - __xbt_ex_ctx()->ctx_ex.msg = (m); \ - __xbt_ex_ctx()->ctx_ex.category = (xbt_errcat_t)(c); \ - __xbt_ex_ctx()->ctx_ex.value = (v); \ - __xbt_ex_ctx()->ctx_ex.remote = 0; \ - __xbt_ex_ctx()->ctx_ex.host = (char*)NULL; \ - __xbt_ex_ctx()->ctx_ex.procname = strdup(xbt_procname()); \ - __xbt_ex_ctx()->ctx_ex.file = (char*)__FILE__; \ - __xbt_ex_ctx()->ctx_ex.line = __LINE__; \ - __xbt_ex_ctx()->ctx_ex.func = (char*)_XBT_FUNCTION; \ + do { /* change this sequence into one block */ \ + /* build the exception */ \ + __xbt_ex_ctx()->ctx_ex.msg = (m); \ + __xbt_ex_ctx()->ctx_ex.category = (xbt_errcat_t)(c); \ + __xbt_ex_ctx()->ctx_ex.value = (v); \ + __xbt_ex_ctx()->ctx_ex.remote = 0; \ + __xbt_ex_ctx()->ctx_ex.host = (char*)NULL; \ + __xbt_ex_ctx()->ctx_ex.procname = (char*)xbt_procname(); \ + __xbt_ex_ctx()->ctx_ex.file = (char*)__FILE__; \ + __xbt_ex_ctx()->ctx_ex.line = __LINE__; \ + __xbt_ex_ctx()->ctx_ex.func = (char*)_XBT_FUNCTION; \ __xbt_ex_ctx()->ctx_ex.used = backtrace((void**)__xbt_ex_ctx()->ctx_ex.bt,XBT_BACKTRACE_SIZE);\ + __xbt_ex_ctx()->ctx_ex.bt_strings = NULL; \ DO_THROW(__xbt_ex_ctx()->ctx_ex);\ } while (0)