|
|
ce426f |
#
|
|
|
ce426f |
# This is the original fix for bug 1124987 in Fedora.
|
|
|
ce426f |
# This patch should never go upstream. We are applying it
|
|
|
ce426f |
# in rhel-7.2 as a workaround.
|
|
|
ce426f |
#
|
|
|
ce426f |
# Upstream commit f8aeae347377f3dfa8cbadde057adf1827fb1d44 fixes
|
|
|
ce426f |
# this issue correctly, but reveals other bugs, therefore for now
|
|
|
ce426f |
# this patch is a workaround.
|
|
|
ce426f |
#
|
|
|
ce426f |
diff -urN glibc-2.17-c758a686/sysdeps/generic/ldsodefs.h glibc-2.17-c758a686/sysdeps/generic/ldsodefs.h
|
|
|
ce426f |
--- glibc-2.17-c758a686/sysdeps/generic/ldsodefs.h 2014-08-21 01:00:55.000000000 -0400
|
|
|
ce426f |
+++ glibc-2.17-c758a686/sysdeps/generic/ldsodefs.h 2014-09-04 19:29:42.929692810 -0400
|
|
|
ce426f |
@@ -388,8 +388,18 @@
|
|
|
ce426f |
have to iterate beyond the first element in the slotinfo list. */
|
|
|
ce426f |
#define TLS_SLOTINFO_SURPLUS (62)
|
|
|
ce426f |
|
|
|
ce426f |
-/* Number of additional slots in the dtv allocated. */
|
|
|
ce426f |
-#define DTV_SURPLUS (14)
|
|
|
ce426f |
+/* Number of additional allocated dtv slots. This was initially
|
|
|
ce426f |
+ 14, but problems with python, MESA, and X11's uses of static TLS meant
|
|
|
ce426f |
+ that most distributions were very close to this limit when they loaded
|
|
|
ce426f |
+ dynamically interpreted languages that used graphics. The simplest
|
|
|
ce426f |
+ solution was to roughly double the number of slots. The actual static
|
|
|
ce426f |
+ image space usage was relatively small, for example in MESA you
|
|
|
ce426f |
+ had only two dispatch pointers for a total of 16 bytes. If we hit up
|
|
|
ce426f |
+ against this limit again we should start a campaign with the
|
|
|
ce426f |
+ distributions to coordinate the usage of static TLS. Any user of this
|
|
|
ce426f |
+ resource is effectively coordinating a global resource since this
|
|
|
ce426f |
+ surplus is allocated for each thread at startup. */
|
|
|
ce426f |
+#define DTV_SURPLUS (32)
|
|
|
ce426f |
|
|
|
ce426f |
/* Initial dtv of the main thread, not allocated with normal malloc. */
|
|
|
ce426f |
EXTERN void *_dl_initial_dtv;
|