[Bug 255698] dlerror() returns non-NULL after a successful call to dlopen()/dlsym()
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue May 11 23:39:47 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255698
--- Comment #7 from Konstantin Belousov <kib at FreeBSD.org> ---
The following should fix the initial dlerror() state.
diff --git a/libexec/rtld-elf/rtld_lock.c b/libexec/rtld-elf/rtld_lock.c
index 94e931c2f760..e501c03f0722 100644
--- a/libexec/rtld-elf/rtld_lock.c
+++ b/libexec/rtld-elf/rtld_lock.c
@@ -60,7 +60,7 @@ void _rtld_atfork_pre(int *) __exported;
void _rtld_atfork_post(int *) __exported;
static char def_dlerror_msg[512];
-static int def_dlerror_seen_val;
+static int def_dlerror_seen_val = 1;
static char *
def_dlerror_loc(void)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list