From: Mathieu Desnoyers Date: Tue, 18 Jun 2013 14:07:57 +0000 (-0400) Subject: Tracepoint.h: replace assertion by fprintf and abort() X-Git-Tag: v2.2.0-rc3~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f3a7421d4709a973c1171ec16635e43b53780331;p=lttng-ust.git Tracepoint.h: replace assertion by fprintf and abort() Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 0629af23..0327c11d 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -23,12 +23,13 @@ * SOFTWARE. */ +#include +#include #include #include #include #include /* for dlopen */ #include /* for memset */ -#include #include /* for sdt */ #include @@ -289,7 +290,10 @@ __tracepoints__destroy(void) return; if (tracepoint_dlopen.liblttngust_handle && !__tracepoint_ptrs_registered) { ret = dlclose(tracepoint_dlopen.liblttngust_handle); - assert(!ret); + if (ret) { + fprintf(stderr, "Error (%d) in dlclose\n", ret); + abort(); + } memset(&tracepoint_dlopen, 0, sizeof(tracepoint_dlopen)); } } @@ -389,7 +393,10 @@ __tracepoints__ptrs_destroy(void) tracepoint_dlopen.tracepoint_unregister_lib(__start___tracepoints_ptrs); if (tracepoint_dlopen.liblttngust_handle && !__tracepoint_registered) { ret = dlclose(tracepoint_dlopen.liblttngust_handle); - assert(!ret); + if (ret) { + fprintf(stderr, "Error (%d) in dlclose\n", ret); + abort(); + } memset(&tracepoint_dlopen, 0, sizeof(tracepoint_dlopen)); } }