Re: struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
On Thursday 15 March 2012 11:57:00 Carlos O'Donell wrote: > We should be rebuilding *all* of userspace when glibc changes. It > would be nice if we setup an OpenEmbedded system to rebuild as much of > x86-64 userspace as possible against a new glibc and check for > regressions. emerge -e world -mike signature.asc Description: This is a digitally signed message part.
Re: struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
On Thu, Mar 15, 2012 at 8:57 AM, Carlos O'Donell wrote: > On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge > wrote: >> Hi! >> >> On 26 Feb 2012 18:17:52 -, drep...@sourceware.org wrote: >>> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2 >>> >>> commit 4efeffc1d583597e4f52985b9747269e47b754e2 >>> Author: Ulrich Drepper >>> Date: Sun Feb 26 13:17:27 2012 -0500 >>> >>> Fix up POSIX testing in conformtest >> >>> [...] >>> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t >>> + struct. [...] >>> [...] >> >>> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h >>> b/sysdeps/unix/sysv/linux/bits/siginfo.h >>> index ecef39d..0635e2f 100644 >>> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h >>> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h >>> [...] >>> @@ -47,7 +47,7 @@ typedef union sigval >>> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) >>> # endif >>> >>> -typedef struct siginfo >>> +typedef struct >>> { >>> int si_signo; /* Signal number. */ >>> int si_errno; /* If non-zero, an errno value associated with >>> [...] >> >> This change breaks GCC: >> >> In file included from >> /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0: >> ./md-unwind-support.h: In function 'sh_fallback_frame_state': >> ./md-unwind-support.h:182:17: error: field 'info' has incomplete type >> >> In my case, this is really libgcc/config/sh/linux-unwind.h: >> >> [...] >> 181 struct rt_sigframe { >> 182 struct siginfo info; >> 183 struct ucontext uc; >> 184 } *rt_ = context->cfa; >> [...] > > POSIX says you get "siginto_t" *not* "struct siginfo," please fix the code. > "struct siginfo" may not work correctly for Linux/x32 and siginfo_t does since siginfo_t has an alignment attribute, which isn't applied to "struct siginfo". -- H.J.
Re: struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge wrote: > Hi! > > On 26 Feb 2012 18:17:52 -, drep...@sourceware.org wrote: >> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2 >> >> commit 4efeffc1d583597e4f52985b9747269e47b754e2 >> Author: Ulrich Drepper >> Date: Sun Feb 26 13:17:27 2012 -0500 >> >> Fix up POSIX testing in conformtest > >> [...] >> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t >> + struct. [...] >> [...] > >> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h >> b/sysdeps/unix/sysv/linux/bits/siginfo.h >> index ecef39d..0635e2f 100644 >> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h >> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h >> [...] >> @@ -47,7 +47,7 @@ typedef union sigval >> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) >> # endif >> >> -typedef struct siginfo >> +typedef struct >> { >> int si_signo; /* Signal number. */ >> int si_errno; /* If non-zero, an errno value associated with >> [...] > > This change breaks GCC: > > In file included from > /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0: > ./md-unwind-support.h: In function 'sh_fallback_frame_state': > ./md-unwind-support.h:182:17: error: field 'info' has incomplete type > > In my case, this is really libgcc/config/sh/linux-unwind.h: > > [...] > 181 struct rt_sigframe { > 182 struct siginfo info; > 183 struct ucontext uc; > 184 } *rt_ = context->cfa; > [...] POSIX says you get "siginto_t" *not* "struct siginfo," please fix the code. > (Is there really nobody doing nightly testing of GCC against glibc master > branch on x86, which would have shown this earlier?) I don't test building GCC against glibc master unless I'm making a potentially ABI breaking change. We should be rebuilding *all* of userspace when glibc changes. It would be nice if we setup an OpenEmbedded system to rebuild as much of x86-64 userspace as possible against a new glibc and check for regressions. > Replacing struct siginfo with siginfo_t in sh/linux-unwind.h makes the > build pass. Is this the desired approach; shall we apply this for all > cases listed above (and submit to Boehm GC upstream)? I wonder -- if GCC > breaks, how much software out in the wild is going to break once this > glibc change ripples through? You can't know until you try building a full distribution. Cheers, Carlos.
struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
Hi! On 26 Feb 2012 18:17:52 -, drep...@sourceware.org wrote: > http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2 > > commit 4efeffc1d583597e4f52985b9747269e47b754e2 > Author: Ulrich Drepper > Date: Sun Feb 26 13:17:27 2012 -0500 > > Fix up POSIX testing in conformtest > [...] > + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t > + struct. [...] > [...] > diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h > b/sysdeps/unix/sysv/linux/bits/siginfo.h > index ecef39d..0635e2f 100644 > --- a/sysdeps/unix/sysv/linux/bits/siginfo.h > +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h > [...] > @@ -47,7 +47,7 @@ typedef union sigval > # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) > # endif > > -typedef struct siginfo > +typedef struct >{ > int si_signo;/* Signal number. */ > int si_errno;/* If non-zero, an errno value associated with > [...] This change breaks GCC: In file included from /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0: ./md-unwind-support.h: In function 'sh_fallback_frame_state': ./md-unwind-support.h:182:17: error: field 'info' has incomplete type In my case, this is really libgcc/config/sh/linux-unwind.h: [...] 181struct rt_sigframe { 182 struct siginfo info; 183 struct ucontext uc; 184} *rt_ = context->cfa; [...] There are more such cases: boehm-gc/os_dep.c:# define SIGINFO_T struct siginfo libgcc/config/alpha/linux-unwind.h: struct siginfo info; libgcc/config/bfin/linux-unwind.h:struct siginfo *pinfo; libgcc/config/bfin/linux-unwind.h:struct siginfo info; libgcc/config/i386/linux-unwind.h:struct siginfo *pinfo; libgcc/config/i386/linux-unwind.h:struct siginfo info; libgcc/config/ia64/linux-unwind.h:struct siginfo *info; libgcc/config/ia64/linux-unwind.h:struct siginfo *info; libgcc/config/mips/linux-unwind.h:struct siginfo info; libgcc/config/pa/linux-unwind.h:struct siginfo info; libgcc/config/sh/linux-unwind.h: struct siginfo *pinfo; libgcc/config/sh/linux-unwind.h: struct siginfo info; libgcc/config/sh/linux-unwind.h: struct siginfo info; libgcc/config/tilepro/linux-unwind.h:struct siginfo info; libgcc/config/xtensa/linux-unwind.h:struct siginfo info; (Is there really nobody doing nightly testing of GCC against glibc master branch on x86, which would have shown this earlier?) Replacing struct siginfo with siginfo_t in sh/linux-unwind.h makes the build pass. Is this the desired approach; shall we apply this for all cases listed above (and submit to Boehm GC upstream)? I wonder -- if GCC breaks, how much software out in the wild is going to break once this glibc change ripples through? Grüße, Thomas pgpkHs9szr65i.pgp Description: PGP signature