arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1227699.patch

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