summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94cf822)
See new comment in plugin-so.c.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
if (shared_lib_handle->module) {
}
if (shared_lib_handle->module) {
- if (!g_module_close(shared_lib_handle->module)) {
- printf_error("Module close error: %s\n",
- g_module_error());
+#ifndef NDEBUG
+ /*
+ * Valgrind shows incomplete stack traces when
+ * dynamically loaded libraries are closed before it
+ * finishes. Use the BABELTRACE_NO_DLCLOSE in a debug
+ * build to avoid this.
+ */
+ const char *var = getenv("BABELTRACE_NO_DLCLOSE");
+
+ if (!var || strcmp(var, "1") != 0) {
+#endif
+ if (!g_module_close(shared_lib_handle->module)) {
+ printf_error("Module close error: %s\n",
+ g_module_error());
+ }
+#ifndef NDEBUG
}
if (shared_lib_handle->path) {
}
if (shared_lib_handle->path) {