Commit 2c8a05db authored by Brice Videau's avatar Brice Videau
Browse files

Added RTLD_DEEPBIND to library loading.

parent 48188368
Pipeline #11684 failed with stage
......@@ -385,9 +385,9 @@ static void _load_tracer(void) {
s = getenv("LTTNG_UST_CUDA_LIBCUDA");
if (s)
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL);
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
else
handle = dlopen("libcuda.so", RTLD_LAZY | RTLD_LOCAL);
handle = dlopen("libcuda.so", RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
if( !handle ) {
fprintf(stderr, "Failure: could not load cuda library!\n");
exit(1);
......
......@@ -1167,9 +1167,9 @@ static void _load_tracer(void) {
s = getenv("LTTNG_UST_OPENCL_LIBOPENCL");
if (s)
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL);
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
else
handle = dlopen("libOpenCL.so", RTLD_LAZY | RTLD_LOCAL);
handle = dlopen("libOpenCL.so", RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
if( !handle ) {
printf("Failure: could not load OpenCL library!\n");
exit(1);
......
......@@ -350,9 +350,9 @@ static void _load_tracer(void) {
s = getenv("LTTNG_UST_ZE_LIBZE_LOADER");
if (s)
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL);
handle = dlopen(s, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
else
handle = dlopen("libze_loader.so", RTLD_LAZY | RTLD_LOCAL);
handle = dlopen("libze_loader.so", RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
if( !handle ) {
fprintf(stderr, "Failure: could not load ze library!\n");
exit(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment