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 <>
To: Martin Husemann <>
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
 - libGL (which is built with -DGLX_USE_TLS):
 /* xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c */
  * We need these to not be extern in 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
 /* xsrc/external/mit/MesaLib.old/dist/src/mapi/glapi/glapi.h */
 _GLAPI_EXPORT extern __thread void * _glapi_tls_Context
 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.

Home | Main Index | Thread Index | Old Index