From 5633e22712d28a609175810a7baa382d90c82809 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 10 Sep 2014 12:08:15 +0000 Subject: [PATCH] Bug 338974 glibc 2.20 changed size of struct sigaction sa_flags on s390 To track POSIX glibc and the kernel agreed to change the type of the sa_flags field in struct sigaction to an int. There is now a int __glibc_reserved0 padding field that can be passed undefined. See https://sourceware.org/ml/libc-alpha/2014-09/msg00161.html git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14508 --- NEWS | 1 + include/vki/vki-s390x-linux.h | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d467258932..e9f6616713 100644 --- a/NEWS +++ b/NEWS @@ -328,6 +328,7 @@ where XXXXXX is the bug number as listed below. 338791 alt dwz files can be relative of debug/main file 338878 on MacOS: assertion 'VG_IS_PAGE_ALIGNED(clstack_end+1)' failed 338932 build V-trunk with gcc-trunk +338974 glibc 2.20 changed size of struct sigaction sa_flags field on s390 n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling n-i-bz s390x: Fix memory corruption for multithreaded applications n-i-bz vex arm->IR: allow PC as basereg in some LDRD cases diff --git a/include/vki/vki-s390x-linux.h b/include/vki/vki-s390x-linux.h index 902bbf5cff..85c449d4e2 100644 --- a/include/vki/vki-s390x-linux.h +++ b/include/vki/vki-s390x-linux.h @@ -258,7 +258,13 @@ struct vki_old_sigaction { struct vki_sigaction { // [[See comment about extra 'k' above]] __vki_sighandler_t ksa_handler; - unsigned long sa_flags; + // Yes, the reserved field is really glibc specific. The kernel + // doesn't have it and uses an unsigned long for sa_flags. + // The glibc and the kernel agreed this is fine and the + // __glibc_reserved0 field can be undefined. + // See https://sourceware.org/ml/libc-alpha/2014-09/msg00161.html + int __glibc_reserved0; + int sa_flags; void (*sa_restorer)(void); vki_sigset_t sa_mask; /* mask last for extensibility */ }; -- 2.47.2