Comment 0 for bug 259219

Revision history for this message
Jonathan Sieber (jonathan-sieber) wrote : Broken TLS support in libGL.so

Binary package hint: libgl1-mesa-dri

The package libgl1-mesa-dri in Intrepid seems to have been compiled with the option --enable-glx-tls. This triggers a bug in src/glx/x11/glxcurrent.c :
The TLS variable __glX_tls_Context is compiled with the TLS model initial-exec, which is only ment for executables. Used in shared libraries, it can break TLS usage in other shared libraries.
One example is when libGL is linked beforce libstdc++ in another library, which is then loaded via dlopen(). In this case, the TLS variables in libstdc++ aren't properly initialized, and it will segfault when trying to allocate an exception.
I think there are 2 possible solutions:
1. Do not compile with --enabgle-glx-tls
2. Patch mesa to remove the tls-model attribute. I assume this will eat up the performance gain of TLS, since initial-exec is meant as an optimisation for apps not using the GL over dlopen directly or indirectly.

Policy information about my libGL package:
libgl1-mesa-dri:
  Installiert: 7.1~rc3-1ubuntu4
  Kandidat: 7.1~rc3-1ubuntu4
  Versions-Tabelle:
 *** 7.1~rc3-1ubuntu4 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status