Package: libc6
Version: 2.5-9

dlvsym can fail but does not seem to set dlerror(), contrary to the
manpage, which explains that error conditions should check dlvsym=NULL
and dlerror!=NULL, because 0 is a valid address.
The same can be said about dlsym also.



The following code outputs:
        (nil)
which is not expected.



/*BINFMTC: -ldl
 dlvsym test code
 */
#define _GNU_SOURCE
#include <dlfcn.h>
#include <stdio.h>

int main()
{
  dlerror();
  if (!dlvsym(RTLD_NEXT, "chown", "NONEXIST"))
    {
      printf("%p\n", dlerror());
    }
  return 0;
}



regards,
        junichi
-- 
[EMAIL PROTECTED],netfort.gr.jp}   Debian Project


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to