The testpoints in the thread_manage_clients and thread_manage_apps are
called after a rcu_register_thread() call. The testpoints were not
unregistering their respective thread which could later on cause a
segfault when shutting down the session daemon.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
+#include <urcu.h>
/*
* Check if the specified environment variable is set.
const char *var = "LTTNG_THREAD_MANAGE_CLIENTS_EXIT";
if (check_env_var(var)) {
+ rcu_unregister_thread();
pthread_exit(NULL);
}
const char *var = "LTTNG_THREAD_MANAGE_APPS_EXIT";
if (check_env_var(var)) {
+ rcu_unregister_thread();
pthread_exit(NULL);
}