Skip to content

Commit

Permalink
libflux/handle: add dlopen RTLD_DEEPBIND flag
Browse files Browse the repository at this point in the history
Problem: connector modules that use json-c may bind with
jansson functions of the same name in an executable's
global symbol table, resulting in undefined behavior.

Add the RTLD_DEEPBIND flag to the dlopen call used
to load connector modules.
  • Loading branch information
garlick committed Oct 12, 2016
1 parent 8b64539 commit c1c8bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/libflux/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static connector_init_f *find_connector (const char *scheme, void **dsop)
}
if (!(path = find_file (name, searchpath)))
goto done;
if (!(dso = dlopen (path, RTLD_LAZY | RTLD_LOCAL))) {
if (!(dso = dlopen (path, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND))) {
errno = EINVAL;
goto done;
}
Expand Down

0 comments on commit c1c8bb5

Please sign in to comment.