This is the mail archive of the
mailing list for the glibc project.
Re: Bug 16713 - [s390x] Member "sa_flags" does not have the correct type
- From: Rich Felker <dalias at libc dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Mark Wielaard <mjw at redhat dot com>, Stefan Liebler <stli at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Tue, 9 Sep 2014 23:49:35 -0400
- Subject: Re: Bug 16713 - [s390x] Member "sa_flags" does not have the correct type
- Authentication-results: sourceware.org; auth=none
- References: <1410305478 dot 27502 dot 10 dot camel at bordewijk dot wildebeest dot org> <87wq9cl2p9 dot fsf at redhat dot com>
On Tue, Sep 09, 2014 at 08:49:22PM -0400, Sergio Durigan Junior wrote:
> On Tuesday, September 09 2014, Mark Wielaard wrote:
> > Maybe glibc wants to pass the struct as intended by the kernel and needs
> > to create a "bridge" struct that properly initializes the kernel's view
> > of sa_flags?
> BTW, as discussed with Mark, a similar approach is done in GDB already.
> However, I think the question is: does glibc need to have both
> declarations? IIUC, this difference was introduced because of POSIX
> conformance, but if it does more harm than good...
> Anyway, I'm really out of my scope here. Just my 0.0001 cent.
glibc needs to have a POSIX conforming public definition of struct
sigaction. If there's any risk of the kernel interpreting the junk in
the upper bits due to the kernel's incorrect definition of the
structure, then glibc needs to make a copy to pass to the kernel, with
the unused bits filled with zeros in the copy.