|
From: Carl L. <ce...@us...> - 2020-02-13 21:54:12
|
Valgrind developers: The PPC architecture has a number of "new" regression errors. There appear to be two root causes for these issues. Not sure if the first of these issues has caused issues on other 64-bit architectures as well. Bug 416760 - ppc64le Assertion 'VG_IS_16_ALIGNED(sizeof(struct rt_sigframe))' failed https://bugs.kde.org/show_bug.cgi?id=416760 Bug 417427 - commit to fix vki_siginfo_t definition created numerous regression errors on PPC64 https://bugs.kde.org/show_bug.cgi?id=417427 Basically the issue comes from commit: commit 3bac39a10abf292d332bb20ab58c6dd5c28f9108 Author: Eugene Syromyatnikov <ev...@gm...> Date: Fri Mar 8 04:07:00 2019 +0100 include/vki: fix vki_siginfo_t definition on amd64, arm64, and ppc64 As it turned out, the size of vki_siginfo_t is incorrect on these 64-bit architectures: (gdb) p sizeof(vki_siginfo_t) $1 = 136 (gdb) ptype struct vki_siginfo type = struct vki_siginfo { int si_signo; int si_errno; int si_code; union { int _pad[29]; struct {...} _kill; struct {...} _timer; struct {...} _rt; struct {...} _sigchld; struct {...} _sigfault; struct {...} _sigpoll; } _sifields; } etc. The issue is the struct rt_sigframe is not properly aligned. The following patch fixed the issue on ppc64 reducing the number of regression errors from == 649 tests, 38 stderr failures, 13 stdout failures, 1 stderrB failure, 5 stdoutB failures, 2 post failures to == 649 tests, 6 stderr failures, 3 stdout failures, 0 stderrB failures, 2 stdoutB failures, 2 post failures == ----------------------------------------------- --- coregrind/m_sigframe/sigframe-ppc64-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_sigframe/sigframe-ppc64-linux.c b/coregrind/m_sigframe/sigframe-ppc64-linux.c index 0406f3c..b54c4e0 100644 --- a/coregrind/m_sigframe/sigframe-ppc64-linux.c +++ b/coregrind/m_sigframe/sigframe-ppc64-linux.c @@ -112,7 +112,7 @@ struct rt_sigframe { vki_siginfo_t info; struct vg_sig_private priv; UChar abigap[288]; // unused -}; +} __attribute__ ((aligned (16))); #define SET_SIGNAL_LR(zztst, zzval) \ do { tst->arch.vex.guest_LR = (zzval); \ -- 2.7.4 --------------------------------------------------- I would like to get some testing done on other architectures to see if it fixes issues on other systems and if it causes any additional issues before committing this patch to Valgrind. Thanks for your help on this. Carl Love |