Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2021 18:18:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 256105] dlerror(3) returns an empty string
Message-ID:  <bug-256105-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 256105
           Summary: dlerror(3) returns an empty string
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org
 Attachment #225202 text/plain
         mime type:

Created attachment 225202
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D225202&action=
=3Dedit
dlerror-return.c

The attached program prints this:
> after dlopen of '/usr/lib/libutil.so' dlerror: p=3D0x800222760 s=3D'' s[0=
]=3D0

dlerror(3) returns an empty, zero-terminated string.

The manpage says that it returns null pointer when no error has occurred:
>      The dlerror() function returns a null-terminated character string
>      describing the last error that occurred during a call to dlopen(),
>      dladdr(), dlinfo(), dlsym(), dlvsym(), dlfunc(), or dlclose().  If no
>      such error has occurred, dlerror() returns a null pointer.  At each =
call
>      to dlerror(), the error indication is reset.  Thus in the case of two
>      calls to dlerror(), where the second call follows the first immediat=
ely,
>      the second call will always return a null pointer.

Was the behavior changes?

I found this problem while investigating why the Jack audio server (audio/j=
ack)
now fails to start with:
> could not find any drivers in /usr/local/lib/jack!

This is because its test for errors fails because of the above.

--=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-256105-227>