diff --git a/0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch b/0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch new file mode 100644 index 0000000..ba74528 --- /dev/null +++ b/0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch @@ -0,0 +1,49 @@ +From b39bd1965ed2fdeadb427648ec7e911613c8398f Mon Sep 17 00:00:00 2001 +Message-Id: +From: Panu Matilainen +Date: Thu, 20 Jun 2019 15:07:12 +0300 +Subject: [PATCH] Fix excessive use of thread local storage (RhBug:1722181), + part II + +This essentially reverts commit ff43d03d1f9686c9ffa9232a64e253783309feb5 +which made these all thread local. It might not be quite right, but then +using TLS is not sensible either - threads have their own signal *mask*, +but disposition is global, and most of what we do here is global anyway. +In addition, the signal queue is only enabled in places where threads +are not used (or would not be safe anyhow) so reverting for now seems +the lesser evil. +--- + rpmio/rpmsq.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c +index d157514e9..249a204b3 100644 +--- a/rpmio/rpmsq.c ++++ b/rpmio/rpmsq.c +@@ -16,9 +16,9 @@ + + #include "debug.h" + +-static __thread int disableInterruptSafety; +-static __thread sigset_t rpmsqCaught; +-static __thread sigset_t rpmsqActive; ++static int disableInterruptSafety; ++static sigset_t rpmsqCaught; ++static sigset_t rpmsqActive; + + typedef struct rpmsig_s * rpmsig; + +@@ -171,8 +171,8 @@ int rpmsqPoll(void) + + int rpmsqBlock(int op) + { +- static __thread sigset_t oldMask; +- static __thread int blocked = 0; ++ static sigset_t oldMask; ++ static int blocked = 0; + sigset_t newMask; + int ret = 0; + +-- +2.21.0 + diff --git a/rpm.spec b/rpm.spec index 4298587..64b0e84 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ %global rpmver 4.14.90 %global snapver git14653 -%global rel 17 +%global rel 18 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -58,6 +58,7 @@ Patch101: 0001-build-Limit-copying-changelog-one-at-a-time.patch Patch102: 0001-Don-t-fail-build-trying-to-kill-a-non-existent-proce.patch # https://github.com/rpm-software-management/rpm/pull/759 Patch103: 0001-Don-t-hog-thread-local-storage-it-s-a-scarce-resourc.patch +Patch104: 0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch # These are not yet upstream Patch906: rpm-4.7.1-geode-i686.patch @@ -544,6 +545,9 @@ make check || (cat tests/rpmtests.log; exit 0) %doc doc/librpm/html/* %changelog +* Thu Jun 20 2019 Panu Matilainen - 4.14.90-0.git14653.18 +- Fix excessive TLS use, part II (#1722181) + * Thu Jun 20 2019 Panu Matilainen - 4.14.90-0.git14653.17 - Fix excessive TLS use (#1722181)