[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 28 23:30:30 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=35268

Natanael Copa <natanael.copa at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|NOTOURBUG                   |---

--- Comment #8 from Natanael Copa <natanael.copa at gmail.com> ---
initial-exec TLS and dlopen'ed libGL is still an issue with musl libc. Here is
a backtrace from a coredump of firefox:

0x664c2c6f5000
Core was generated by `/usr/lib/firefox-26.0/firefox'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000664c1fb519a8 in __glXSetupForCommand (dpy=0xae298156200)
    at glxext.c:917
917    glxext.c: No such file or directory.
(gdb) bt
#0  0x0000664c1fb519a8 in __glXSetupForCommand (dpy=0xae298156200)
    at glxext.c:917
#1  0x0000664c1fb4ffcd in glx_context_init (gc=gc at entry=0xae298165480, 
    psc=psc at entry=0xae298164d60, config=config at entry=0xae29816f3e0)
    at glxcmds.c:258
#2  0x0000664c1fb7b940 in dri2_create_context (base=0xae298164d60, 
    config_base=0xae29816f3e0, shareList=<optimized out>, renderType=32788)
    at dri2_glx.c:228
#3  0x0000664c1fb4f3ed in CreateContext (dpy=dpy at entry=0xae298156200, 
    generic_id=141, config=0xae29816f3e0, 
    shareList_user=shareList_user at entry=0x0, allowDirect=<optimized out>, 
    code=code at entry=3, renderType=32788, screen=0) at glxcmds.c:301
#4  0x0000664c1fb4f6e1 in glXCreateContext (dpy=0xae298156200, 
    vis=0xae2981651e0, shareList=0x0, allowDirect=1) at glxcmds.c:430
#5  0x0000664c28f95774 in ?? () from /usr/lib/firefox-26.0/xulrunner/libxul.so
#6  0x0000664c28f95918 in ?? () from /usr/lib/firefox-26.0/xulrunner/libxul.so
#7  0x0000664c28f8da28 in ?? () from /usr/lib/firefox-26.0/xulrunner/libxul.so
#8  0x0000664c28f90e76 in ?? () from /usr/lib/firefox-26.0/xulrunner/libxul.so
#9  0x0000664c28f91127 in XRE_main ()
   from /usr/lib/firefox-26.0/xulrunner/libxul.so
#10 0x00000ae2946dd30f in do_main (xreDirectory=0x664c2c16e440, 
    argv=0x733c6106a4c8, argc=1)
    at
/home/buildozer/aports/main/firefox/src/mozilla-release/browser/app/nsBrowserApp.cpp:275
#11 main (argc=<optimized out>, argv=<optimized out>)
    at
/home/buildozer/aports/main/firefox/src/mozilla-release/browser/app/nsBrowserApp.cpp:635
(gdb)

It is mesa 9.2.5, so the segfault happens in:
http://cgit.freedesktop.org/mesa/mesa/tree/src/glx/glxext.c?h=9.2#n917

 gc = __glXGetCurrentContext();

I believe that __glxGetCurrentContext is defined as a macro:
http://cgit.freedesktop.org/mesa/mesa/tree/src/glx/glxcurrent.c?h=9.2#n82


I believe that it segfaults due to the use of initial-exec use:
__thread void *__glX_tls_Context __attribute__ ((tls_model("initial-exec")))
   = &dummyContext;

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140129/b46c9889/attachment-0001.html>


More information about the mesa-dev mailing list