On Wed, Nov 15, 2017 at 11:19:41AM +0100, Richard Weinberger wrote:
> Am Mittwoch, 15. November 2017, 11:12:39 CET schrieb Krzysztof Mazur:
> > glibc 2.26 removed the 'struct ucontext' to "improve" POSIX compliance
> > and break programs, including User Mode Linux. Fix User Mode Linux
> > by using POSIX ucontext_t.
> >
> > This fixes:
> >
> > arch/um/os-Linux/signal.c: In function 'hard_handler':
> > arch/um/os-Linux/signal.c:163:22: error: dereferencing pointer to incomplete
> > type 'struct ucontext' mcontext_t *mc = &uc->uc_mcontext;
> > arch/x86/um/stub_segv.c: In function 'stub_segv_handler':
> > arch/x86/um/stub_segv.c:16:13: error: dereferencing pointer to incomplete
> > type 'struct ucontext' &uc->uc_mcontext);
>
> Do all older glibcs have ucontext_t?
> Otherwise this patch will break other stuff.
Yes, ucontext_t typedef was always available. They changed:
typedef struct ucontext { ... } ucontex_t;
to
typedef struct ucontext_t { ... } ucontex_t;
https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27struct_ucontext.27
Thanks,
Krzysiek
From 1584133605963623461@xxx Wed Nov 15 12:05:33 +0000 2017
X-GM-THRID: 1584126952248990726
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread
Am Mittwoch, 15. November 2017, 12:04:16 CET schrieb Krzysztof Mazur:
> On Wed, Nov 15, 2017 at 11:19:41AM +0100, Richard Weinberger wrote:
> > Am Mittwoch, 15. November 2017, 11:12:39 CET schrieb Krzysztof Mazur:
> > > glibc 2.26 removed the 'struct ucontext' to "improve" POSIX compliance
> > > and break programs, including User Mode Linux. Fix User Mode Linux
> > > by using POSIX ucontext_t.
> > >
> > > This fixes:
> > >
> > > arch/um/os-Linux/signal.c: In function 'hard_handler':
> > > arch/um/os-Linux/signal.c:163:22: error: dereferencing pointer to
> > > incomplete type 'struct ucontext' mcontext_t *mc = &uc->uc_mcontext;
> > > arch/x86/um/stub_segv.c: In function 'stub_segv_handler':
> > > arch/x86/um/stub_segv.c:16:13: error: dereferencing pointer to
> > > incomplete
> > > type 'struct ucontext' &uc->uc_mcontext);
> >
> > Do all older glibcs have ucontext_t?
> > Otherwise this patch will break other stuff.
>
> Yes, ucontext_t typedef was always available. They changed:
>
> typedef struct ucontext { ... } ucontex_t;
>
> to
>
> typedef struct ucontext_t { ... } ucontex_t;
>
> https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27struct_ucontext
> .27
Okay, then we can mark your patch as stable and hope for the best. ;-)
Thanks,
//richard
From 1584105892146266454@xxx Wed Nov 15 04:45:03 +0000 2017
X-GM-THRID: 1584098927867225721
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread