]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/glibc/glibc-rh1291270.patch
dhcpcd: fix delay after dhcp down.
[ipfire-2.x.git] / src / patches / glibc / glibc-rh1291270.patch
1 Description: Allow loading more libraries with static TLS.
2 Author: Carlos O'Donell <codonell@redhat.com>
3 Origin: PATCH
4 Bug-RHEL: #1291270 (rhel-6.7.z), #1198802 (rhel-6.8), #1202952 (rhel-7.2)
5 Bug-Fedora: #1124987 (F21)
6 Bug-Upstream: #17090, #17620, #17621, #17628 (2.22)
7 Upstream status: not-needed
8 #
9 # The correct fix for this is already upstream and involves
10 # changing the heuristics for DTV slot increases. In RHEL6
11 # we take the conservative approach and provide a larger
12 # slot surplus. This matches what was done in Fedora 21 before
13 # we had the upstream fix: f8aeae347377f3dfa8cbadde057adf1827fb1d44.
14 # In RHEL7 we have the upstream fix. This is fixed upstream as of
15 # glibc 2.22.
16 #
17 Index: glibc-2.12-2-gc4ccff1/sysdeps/generic/ldsodefs.h
18 ===================================================================
19 --- glibc-2.12-2-gc4ccff1.orig/sysdeps/generic/ldsodefs.h
20 +++ glibc-2.12-2-gc4ccff1/sysdeps/generic/ldsodefs.h
21 @@ -496,8 +496,18 @@ struct rtld_global
22 have to iterate beyond the first element in the slotinfo list. */
23 #define TLS_SLOTINFO_SURPLUS (62)
24
25 -/* Number of additional slots in the dtv allocated. */
26 -#define DTV_SURPLUS (14)
27 +/* Number of additional allocated dtv slots. This was initially
28 + 14, but problems with python, MESA, and X11's uses of static TLS meant
29 + that most distributions were very close to this limit when they loaded
30 + dynamically interpreted languages that used graphics. The simplest
31 + solution was to roughly double the number of slots. The actual static
32 + image space usage was relatively small, for example in MESA you
33 + had only two dispatch pointers for a total of 16 bytes. If we hit up
34 + against this limit again we should start a campaign with the
35 + distributions to coordinate the usage of static TLS. Any user of this
36 + resource is effectively coordinating a global resource since this
37 + surplus is allocated for each thread at startup. */
38 +#define DTV_SURPLUS (32)
39
40 /* Initial dtv of the main thread, not allocated with normal malloc. */
41 EXTERN void *_dl_initial_dtv;