From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1E298158086 for ; Mon, 25 Oct 2021 05:02:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 15C0EE07F9; Mon, 25 Oct 2021 05:02:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD16EE07F9 for ; Mon, 25 Oct 2021 05:02:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3B1B343503 for ; Mon, 25 Oct 2021 05:02:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0BEEA132 for ; Mon, 25 Oct 2021 05:02:06 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1635138116.8a4f3bfafba7104d92d94a25913e3068599e1df7.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/elfutils/elfutils-0.185.ebuild dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch X-VCS-Directories: dev-libs/elfutils/ dev-libs/elfutils/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8a4f3bfafba7104d92d94a25913e3068599e1df7 X-VCS-Branch: master Date: Mon, 25 Oct 2021 05:02:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0841c0fd-a915-42b0-aacf-15affccf65bd X-Archives-Hash: 6603a214ec039684cfcb32af4f492ddb commit: 8a4f3bfafba7104d92d94a25913e3068599e1df7 Author: Sam James gentoo org> AuthorDate: Mon Oct 25 04:58:28 2021 +0000 Commit: Sam James gentoo org> CommitDate: Mon Oct 25 05:01:56 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a4f3bfa dev-libs/elfutils: backport glibc-2.34 test failure patch Closes: https://bugs.gentoo.org/808765 Signed-off-by: Sam James gentoo.org> dev-libs/elfutils/elfutils-0.185.ebuild | 1 + .../elfutils-0.185-glibc-2.34-test-failure.patch | 124 +++++++++++++++++++++ 2 files changed, 125 insertions(+) diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild b/dev-libs/elfutils/elfutils-0.185.ebuild index fd5ccd26159..a73fbfc0492 100644 --- a/dev-libs/elfutils/elfutils-0.185.ebuild +++ b/dev-libs/elfutils/elfutils-0.185.ebuild @@ -36,6 +36,7 @@ PATCHES=( "${FILESDIR}"/${PN}-0.185-static-inline.patch "${FILESDIR}"/${PN}-0.185-pull-advance_pc-in-file-scope.patch "${FILESDIR}"/${PN}-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch + "${FILESDIR}"/${PN}-0.185-glibc-2.34-test-failure.patch ) src_prepare() { diff --git a/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch b/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch new file mode 100644 index 00000000000..134e642ab0e --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch @@ -0,0 +1,124 @@ +https://sourceware.org/git/?p=elfutils.git;a=commit;h=9aee0992d6e6ec4cce2c015d8da4b61022c6f6dd + +Author: Mark Wielaard +Date: Wed Aug 4 21:01:27 2021 +0200 + + tests: Allow an extra pthread_kill frame in backtrace tests + + glibc 2.34 calls pthread_kill from the raise function. Before raise + directly called the (tg)kill syscall. So allow pthread_kill to be the + first frame in a backtrace where raise is expected. Also change some + asserts to fprintf plus abort to make it more clear why the testcase + fails. + + https://sourceware.org/bugzilla/show_bug.cgi?id=28190 + + Signed-off-by: Mark Wielaard + +--- a/tests/backtrace.c ++++ b/tests/backtrace.c +@@ -97,6 +97,9 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, + static bool reduce_frameno = false; + if (reduce_frameno) + frameno--; ++ static bool pthread_kill_seen = false; ++ if (pthread_kill_seen) ++ frameno--; + if (! use_raise_jmp_patching && frameno >= 2) + frameno += 2; + const char *symname2 = NULL; +@@ -107,11 +110,26 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, + && (strcmp (symname, "__kernel_vsyscall") == 0 + || strcmp (symname, "__libc_do_syscall") == 0)) + reduce_frameno = true; ++ else if (! pthread_kill_seen && symname ++ && strstr (symname, "pthread_kill") != NULL) ++ pthread_kill_seen = true; + else +- assert (symname && strcmp (symname, "raise") == 0); ++ { ++ if (!symname || strcmp (symname, "raise") != 0) ++ { ++ fprintf (stderr, ++ "case 0: expected symname 'raise' got '%s'\n", symname); ++ abort (); ++ } ++ } + break; + case 1: +- assert (symname != NULL && strcmp (symname, "sigusr2") == 0); ++ if (symname == NULL || strcmp (symname, "sigusr2") != 0) ++ { ++ fprintf (stderr, ++ "case 1: expected symname 'sigusr2' got '%s'\n", symname); ++ abort (); ++ } + break; + case 2: // x86_64 only + /* __restore_rt - glibc maybe does not have to have this symbol. */ +@@ -120,11 +138,21 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, + if (use_raise_jmp_patching) + { + /* Verify we trapped on the very first instruction of jmp. */ +- assert (symname != NULL && strcmp (symname, "jmp") == 0); ++ if (symname == NULL || strcmp (symname, "jmp") != 0) ++ { ++ fprintf (stderr, ++ "case 3: expected symname 'raise' got '%s'\n", symname); ++ abort (); ++ } + mod = dwfl_addrmodule (dwfl, pc - 1); + if (mod) + symname2 = dwfl_module_addrname (mod, pc - 1); +- assert (symname2 == NULL || strcmp (symname2, "jmp") != 0); ++ if (symname2 == NULL || strcmp (symname2, "jmp") != 0) ++ { ++ fprintf (stderr, ++ "case 3: expected symname2 'jmp' got '%s'\n", symname2); ++ abort (); ++ } + break; + } + FALLTHROUGH; +@@ -137,11 +165,22 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, + duplicate_sigusr2 = true; + break; + } +- assert (symname != NULL && strcmp (symname, "stdarg") == 0); ++ if (symname == NULL || strcmp (symname, "stdarg") != 0) ++ { ++ fprintf (stderr, ++ "case 4: expected symname 'stdarg' got '%s'\n", symname); ++ abort (); ++ } + break; + case 5: + /* Verify we trapped on the very last instruction of child. */ +- assert (symname != NULL && strcmp (symname, "backtracegen") == 0); ++ if (symname == NULL || strcmp (symname, "backtracegen") != 0) ++ { ++ fprintf (stderr, ++ "case 5: expected symname 'backtracegen' got '%s'\n", ++ symname); ++ abort (); ++ } + mod = dwfl_addrmodule (dwfl, pc); + if (mod) + symname2 = dwfl_module_addrname (mod, pc); +@@ -151,7 +190,15 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, + // instructions or even inserts some padding instructions at the end + // (which apparently happens on ppc64). + if (use_raise_jmp_patching) +- assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0); ++ { ++ if (symname2 != NULL && strcmp (symname2, "backtracegen") == 0) ++ { ++ fprintf (stderr, ++ "use_raise_jmp_patching didn't expect symname2 " ++ "'backtracegen'\n"); ++ abort (); ++ } ++ } + break; + } + }