dlopen busy-loops

Bruno Haible haible@ilog.fr
Mon Feb 4 04:20:00 GMT 2002


Hi,

With glibc-2002-01-15, the following program loops eating CPU time.

======================== a.c ================================
#include <dlfcn.h>
int main ()
{
  dlopen ("gnu-gettext-GetURL$1", RTLD_GLOBAL | RTLD_LAZY);
  return 0;
}
=============================================================

$ gcc a.c -ldl
$ ./a.out

This occurs when gij (from gcc-3.0.3) attempts to load class
gnu.gettext.GetURL. gij first attempts to locate it in a shared library
before searching in the jar file.

The loop was in a line calling _dl_dst_count. Maybe you already fixed
it two days ago; in that case, feel free to add this program to the
tests :-)

Bruno



More information about the Libc-alpha mailing list