pkgsrc-Bugs archive

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

Re: pkg/57445: firefox crashes on startup



The following reply was made to PR pkg/57445; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Martin Husemann <martin%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, joerg%NetBSD.org@localhost, tnn%NetBSD.org@localhost
Subject: Re: pkg/57445: firefox crashes on startup
Date: Thu, 1 Jun 2023 12:21:35 +0000

 martin: Can you get the ld.elf_so debug output _without_ the ld.elf_so
 patch that tries to fix the underlying extern __thread problem?
 Curious to see how it compares.
 
 
 So here are the relevant definitions and declarations:
 
 
 - libglapi:
 
 /* xsrc/external/mit/MesaLib.old/dist/src/mapi/u_current.h */
 #define u_current_context _glapi_tls_Context
 
 /* xsrc/external/mit/MesaLib.old/dist/src/mapi/u_current.c */
 __thread void *u_current_context
     __attribute__((tls_model("initial-exec")));
 
 
 - libGL (which is built with -DGLX_USE_TLS):
 
 /* xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c */
 /*
  * MASSIVE KLUDGE!
  * We need these to not be extern in libGL.so because of
  * PR toolchain/50277
  */
 #if defined(GLX_USE_TLS) && defined(__NetBSD__)
 _X_EXPORT __thread struct _glapi_table * _glapi_tls_Dispatch
     __attribute__((tls_model("initial-exec"))) = NULL;
 _X_EXPORT __thread void * _glapi_tls_Context
     __attribute__((tls_model("initial-exec")));
 #endif
 
 
 - swrast_dri.so:
 
 /* xsrc/external/mit/MesaLib.old/dist/src/mapi/glapi/glapi.h */
 
 _GLAPI_EXPORT extern __thread void * _glapi_tls_Context
     __attribute__((tls_model("initial-exec")));
 
 
 This MASSIVE KLUDGE -- did it ever actually work or did it only paper
 over a symptom, or did it try to work around two problems (static TLS
 symbol resolution is broken, _and_ static TLS initialization must be
 zero) and only work around one of them while papering over the other?
 Do we have a test case showing that it actually worked?  Was there
 some precondition in the original massive kludge that made it
 applicable at the time, but no longer?
 
 Note: The original massive kludge was applied to pkgsrc in 2015 in the
 update to mesa-11.0.0, then merged into xsrc in 2019, then updated in
 pkgsrc in early 2020; then TLS disabled altogether in pkgsrc (except
 on linux/glibc) shortly after in 2020 as it has remained since.
 
 https://mail-index.netbsd.org/pkgsrc-users/2015/09/11/msg022180.html
 https://mail-index.netbsd.org/pkgsrc-changes/2015/09/26/msg130441.html
 https://mail-index.netbsd.org/source-changes/2019/04/09/msg104932.html
 https://mail-index.netbsd.org/pkgsrc-changes/2020/02/19/msg206832.html
 https://mail-index.netbsd.org/pkgsrc-changes/2020/04/09/msg210367.html
 


Home | Main Index | Thread Index | Old Index