This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struct siginfo vs. siginfo_t (was: GNU C Library master sourcesbranch, master, updated. glibc-2.15-229-g4efeffc)


On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> Hi!
>
> On 26 Feb 2012 18:17:52 -0000, drepper@sourceware.org wrote:
>> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2
>>
>> commit 4efeffc1d583597e4f52985b9747269e47b754e2
>> Author: Ulrich Drepper <drepper@gmail.com>
>> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]