glibc and dopen'ing modules with static TLS problem, question

Andrey Erschov
Wed Nov 20 03:51:00 GMT 2013


On Fedora 19 (64-bit) I'm getting error "cannot load any more object
with static TLS" while running proprietary accounting program, which
tries to load, which, in it's order, depends on compiled with static TLS.

On Ubuntu 13.04 (64-bit) same program works ok.

Running program with helps, but this is not so
accurate solution, as I think.

Looking into sources of glibc, i've found code responsible for this message:
  if (! RTLD_SINGLE_THREAD_P && imap->l_tls_modid > DTV_SURPLUS)
    _dl_signal_error (0, "dlopen", NULL, N_("\
cannot load any more object with static TLS"));

So I have a question: shouldn't the right part of && operator be like this:
imap->l_tls_modid >= GL(dl_tls_max_dtv_idx) + DTV_SURPLUS

If no, could you help me with next steps to adress the problem?

Thank you in advance!

--  With best regards,

More information about the Libc-help mailing list