[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#37604: libc6: dlopen() returns non-NULL even if it fails to resolve with RTLD_NOW

Package: libc6

dlopen(), according to its man page, returns NULL if any of its task
fails.  However, if it fails to find a symbol needed to load the new
library, it will set the error flag [dlerror() returns non-NULL] but
will still return non-NULL, meaning that 'the library loaded
successfully.'  Since it stops processing at the symbol that fails, the
rest of the library is not linked, so eventually an Illegal Instruction
(SIGILL) shows up.  The error returned by dlerror() for this case is:
foo.so: undefined symbol: foo
	I personally feel that the fix would be to make dlerror() return
NULL in that case, but it is probably equally correct to just fix the
manual to indicate that dlopen() can return non-NULL without success,
similar to how the manpage indicates that dlsym() can return NULL with

-- System Information
Debian Release: 2.1
Kernel Version: Linux cricket 2.0.36 #10 Sat Jan 16 23:07:07 EST 1999 i586 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.10-1       The Linux dynamic linker, library and utilit

Reply to: