Skip to content

Commit

Permalink
log: Use RTLD_NOOPEN when checking symbols (#310)
Browse files Browse the repository at this point in the history
on FreeBSD 11 call dlopen on a shared library causes the constructors
to run again. As we're just getting symbols we don't need this to
happen.

Actually we don't WANT it to happen because it can cause qb_log_init to
be called twice (recursively) and the dlnames list gets corrupted. This
causess corosync (at leasT0 to crash at startup.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
  • Loading branch information
chrissie-c committed May 14, 2018
1 parent eeb5e45 commit c235284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/log.c
Expand Up @@ -831,7 +831,7 @@ _log_so_walk_dlnames(void)
qb_list_for_each_safe(iter, next, &dlnames) {
dlname = qb_list_entry(iter, struct dlname, list);

handle = dlopen(dlname->dln_name, RTLD_LAZY);
handle = dlopen(dlname->dln_name, RTLD_LAZY|RTLD_NOLOAD);
error = dlerror();
if (!handle || error) {
qb_log(LOG_ERR, "%s", error);
Expand Down

0 comments on commit c235284

Please sign in to comment.