Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 May 2021 23:39:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255698] dlerror() returns non-NULL after a successful call to dlopen()/dlsym()
Message-ID:  <bug-255698-227-7jCKKnllJn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255698-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255698-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255698

--- Comment #7 from Konstantin Belousov <kib@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 =3D 1;

 static char *
 def_dlerror_loc(void)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255698-227-7jCKKnllJn>