]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
PPC64, fix for alignment of the rt_sigframe data structure.
authorCarl Love <carll@us.ibm.com>
Fri, 21 Feb 2020 23:22:26 +0000 (17:22 -0600)
committerCarl Love <carll@us.ibm.com>
Fri, 21 Feb 2020 23:22:26 +0000 (17:22 -0600)
The PPC64 implementation checks that the data structure is aligned.  The
changes in commit listed below breaks the alignment.  This patch adds an
explicit alignment directive to ensure the data structure is allocated
with the required alignment.  This fixes 31 stderr failures, 10 stdout
failures on the Power 7, Power 8 and Power 9 platforms.

commit 3bac39a10abf292d332bb20ab58c6dd5c28f9108
Author: Eugene Syromyatnikov <evgsyr@gmail.com>
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.

NEWS
coregrind/m_sigframe/sigframe-ppc64-linux.c

diff --git a/NEWS b/NEWS
index 5dbb014c402a7a06b2cf3a14a18c60592c327f5c..84e08409dbed84021d98032be53a8af84eca62fd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -123,6 +123,8 @@ n-i-bz  Add support for the Linux io_uring system calls
 n-i-bz  sys_statx: don't complain if both |filename| and |buf| are NULL.
 n-i-bz  Fix non-glibc build of test suite with s390x_features
 416667  gcc10 ppc64le impossible constraint in 'asm' in test_isa.
+417427  commit to fix vki_siginfo_t definition created numerous regression
+        errors on ppc64
 417452  s390_insn_store_emit: dst->tag for HRcVec128
 417906  clone with CLONE_VFORK and no CLONE_VM fails
 
index 0406f3c4506a1afba8ce435008c80c32ef3c0776..b54c4e0be05b9de20d114abf77390c74615281dc 100644 (file)
@@ -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);                    \