From d4802dc28dbedd6b081fe5f3bb5107d60336781b Mon Sep 17 00:00:00 2001 From: sdlzx Date: Fri, 25 Sep 2020 15:30:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add=20gperftools-generic-dynamic-tls.patch.?= =?UTF-8?q?=20issue=E6=A0=B9=E5=9B=A0=EF=BC=9A=20gperftools=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BD=BF=E7=94=A8=E4=BA=86=5F=5Fattribute=5F=5F=20((t?= =?UTF-8?q?ls=5Fmodel=20("initial-exec")))=E5=AF=BC=E8=87=B4=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=BA=93libunwind=E4=B8=8D=E8=83=BD=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=A0=88=E4=BF=A1=E6=81=AF=E5=B9=B6=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=E3=80=82=20=E7=9B=B8=E5=85=B3=E8=B5=84=E6=96=99?= =?UTF-8?q?=EF=BC=9A=20=E6=A0=B9=E6=8D=AEgcc=E5=AE=98=E6=96=B9=E6=89=8B?= =?UTF-8?q?=E5=86=8C=E6=8F=90=E4=BE=9B=E7=9A=84=E5=8F=82=E8=80=83=E8=B5=84?= =?UTF-8?q?=E6=96=99=EF=BC=8Cinitial-exec=E5=AF=B9=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=BA=94=E5=BD=93=E6=98=AF=E9=9D=99=E6=80=81?= =?UTF-8?q?=E7=9A=84=E3=80=81=E5=9C=A8=E7=A8=8B=E5=BA=8F=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E5=8A=A0=E8=BD=BD=E7=9A=84=E5=8F=98=E9=87=8F=EF=BC=88?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=BA=93=E4=B8=80=E8=88=AC=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E8=BF=99=E7=A7=8D=E6=A8=A1=E5=9E=8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=E4=B8=AA=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=AF=94=E8=BE=83=E5=A5=BD=E3=80=82=20=E5=AF=B9?= =?UTF-8?q?=E4=BA=8Ex86=5F64=EF=BC=8Clibunwind=E6=9C=89=E9=A2=9D=E5=A4=96?= =?UTF-8?q?=E7=9A=84=E9=98=B2=E6=8A=A4=E4=BF=9D=E8=AF=81=E8=B6=8A=E7=95=8C?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E4=B8=8D=E8=A7=A6=E5=8F=91SIGSEGV=EF=BC=8C?= =?UTF-8?q?=E5=9B=A0=E6=AD=A4=E6=B2=A1=E6=9C=89=E5=B4=A9=E6=BA=83=E3=80=82?= =?UTF-8?q?aarch64=E5=AF=B9=E5=BA=94=E7=9A=84=E4=BB=A3=E7=A0=81=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=AF=B9=E5=BA=94=E7=9A=84=E9=98=B2=E6=8A=A4?= =?UTF-8?q?=E6=8E=AA=E6=96=BD=E3=80=82=20=E5=8F=82=E8=80=83=E8=B5=84?= =?UTF-8?q?=E6=96=99=EF=BC=9A=20https://gcc.gnu.org/onlinedocs/gcc/Thread-?= =?UTF-8?q?Local.html#Thread-Local=20https://www.akkadia.org/drepper/tls.p?= =?UTF-8?q?df=20src/heap-checker.cc=20+444?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gperftools-generic-dynamic-tls.patch | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 gperftools-generic-dynamic-tls.patch diff --git a/gperftools-generic-dynamic-tls.patch b/gperftools-generic-dynamic-tls.patch new file mode 100644 index 0000000..0253982 --- /dev/null +++ b/gperftools-generic-dynamic-tls.patch @@ -0,0 +1,47 @@ +From 2ab82df5d631f5da10da2ff73b515a8aa25fe819 Mon Sep 17 00:00:00 2001 +Date: Tue, 22 Sep 2020 20:38:53 +0800 +Subject: [PATCH] enable-generic-dynamic-tls + +fedora has a patch for aarch64, which fixes this issue https://gitee.com/src-openeuler/gperftools/issues/I1VAEU + +--- + configure.ac | 10 ++++++++++ + src/base/basictypes.h | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 500f8be..b1b12f8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -670,6 +670,16 @@ AS_IF([test "x$enable_aggressive_decommit_by_default" = xyes], + 1, + [enable aggressive decommit by default])]) + ++default_enable_generic_dynamic_tls=yes ++AC_ARG_ENABLE([general-dynamic-tls], ++ [AS_HELP_STRING([--disable-general-dynamic-tls], ++ [Do not use the general dynamic TLS model])], ++ [], ++ [enable_generic_dynamic_tls="$default_enable_generic_dynamic_tls"]) ++AS_IF([test "x$enable_generic_dynamic_tls" = xyes], ++ [AC_DEFINE([ENABLE_GENERIC_DYNAMIC_TLS], 1, ++ [Use the generic dynamic TLS model])]) ++ + # Write generated configuration file + AC_CONFIG_FILES([Makefile + src/gperftools/tcmalloc.h src/windows/gperftools/tcmalloc.h]) +diff --git a/src/base/basictypes.h b/src/base/basictypes.h +index 356b3d5..b737d47 100644 +--- a/src/base/basictypes.h ++++ b/src/base/basictypes.h +@@ -200,7 +200,7 @@ struct CompileAssert { + # define ATTRIBUTE_UNUSED + #endif + +-#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) ++#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) && defined(ENABLE_GENERIC_DYNAMIC_TLS) + #define ATTR_INITIAL_EXEC __attribute__ ((tls_model ("initial-exec"))) + #else + #define ATTR_INITIAL_EXEC +-- +1.8.3.1 \ No newline at end of file -- Gitee From c36abc9c09534433feddcdd7033cce649392ec08 Mon Sep 17 00:00:00 2001 From: sdlzx Date: Fri, 25 Sep 2020 15:33:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20gperftools.spec.=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=A1=A5=E4=B8=81=E4=BF=AE=E5=A4=8Dissue=20#I1VAEU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gperftools.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gperftools.spec b/gperftools.spec index 96f56bc..27c6775 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -1,11 +1,12 @@ Name: gperftools Version: 2.8 -Release: 1 +Release: 2 Summary: high-performance malloc and performance analysis tools License: BSD URL: https://github.com/gperftools/gperftools Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz +patch1 : gperftools-generic-dynamic-tls.patch Patch9000: issue-1122-fix-bus-error-on-aarch64.patch BuildRequires: autoconf automake gcc-c++ gdb @@ -98,6 +99,10 @@ make %{_mandir}/man1/*.1.gz %changelog +* Tue Sep 22 2020 liuzixian - 2.8-2 +- Type: bufgix +- Reason: add patch gperftools-generic-dynamic-tls.patch to fix issue #I1VAEU. + * Thu Jul 23 2020 jinzhimin - 2.8-1 - update to 2.8 -- Gitee