From 1e3d9fc4ceeaa6df06bb4b31a58b18de9e8bb797 Mon Sep 17 00:00:00 2001 From: huyubiao Date: Mon, 15 Sep 2025 14:41:03 +0800 Subject: [PATCH] fix AA deadlock when export LD_PRELOAD libasan --- ...when-export-LD_PRELOAD-usr-lib64-lib.patch | 25 +++++++++++++++++++ gcc.spec | 8 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 fix-AA-deadlock-when-export-LD_PRELOAD-usr-lib64-lib.patch diff --git a/fix-AA-deadlock-when-export-LD_PRELOAD-usr-lib64-lib.patch b/fix-AA-deadlock-when-export-LD_PRELOAD-usr-lib64-lib.patch new file mode 100644 index 0000000..bcdf899 --- /dev/null +++ b/fix-AA-deadlock-when-export-LD_PRELOAD-usr-lib64-lib.patch @@ -0,0 +1,25 @@ +From 451226713f1432b32cfc76223bfc77d38ba46b01 Mon Sep 17 00:00:00 2001 +From: xujing +Date: Sun, 12 Jun 2022 04:49:53 +0800 +Subject: [PATCH] fix AA deadlock when export + LD_PRELOAD=/usr/lib64/libasan.so.6 + +--- + .../sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp b/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp +index c123ecb11..40ef01d65 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp ++++ b/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp +@@ -72,7 +72,6 @@ static swift_demangle_ft swift_demangle_f; + // symbolication. + static void InitializeSwiftDemangler() { + swift_demangle_f = (swift_demangle_ft)dlsym(RTLD_DEFAULT, "swift_demangle"); +- (void)dlerror(); // Cleanup error message in case of failure + } + + // Attempts to demangle a Swift name. The demangler will return nullptr if a +-- +2.23.0 + diff --git a/gcc.spec b/gcc.spec index f424b3d..6e86dfc 100644 --- a/gcc.spec +++ b/gcc.spec @@ -2,7 +2,7 @@ %global gcc_major 12 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 98 +%global gcc_release 99 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 @@ -507,6 +507,7 @@ Patch394: 0394-SVE-Add-SVE-constraint.patch Patch395: 0395-update-ai-model.patch Patch396: 0396-Add-pattern-for-cmlt-and-change-hip12.patch Patch397: 0397-SVE-Fix-cross-compile-error.patch +Patch398: fix-AA-deadlock-when-export-LD_PRELOAD-usr-lib64-lib.patch # Part 1001-1999 %ifarch sw_64 @@ -1690,6 +1691,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch -P395 -p1 %patch -P396 -p1 %patch -P397 -p1 +%patch -P398 -p1 %ifarch sw_64 %patch -P1001 -p1 @@ -4317,6 +4319,10 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Mon Sep 15 2025 huyubiao - 12.3.1-99 +- Type: Bugfix +- DESC: fix AA deadlock when export LD_PRELOAD libasan + * Mon Sep 1 2025 zhangjingwang - 12.3.1-98 - Type: Sync - DESC: Sync patches from openeuler/gcc. -- Gitee