This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] S/390: Fix makecontext with uc_link == NULL
- From: Carlos O'Donell <carlos_odonell at mentor dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: Carlos O'Donell <carlos at codesourcery dot com>, <libc-alpha at sourceware dot org>
- Date: Thu, 12 Jul 2012 09:38:35 -0400
- Subject: Re: [PATCH] S/390: Fix makecontext with uc_link == NULL
- References: <20120710102022.GA5123@bart> <4FFC2AA3.50908@codesourcery.com> <20120712121908.GA6549@bart>
On 7/12/2012 8:19 AM, Andreas Krebbel wrote:
>> Do we have a testcase that covers this failure?
>>
>> If we don't, could you try to work one up?
>
> stdlib/tst-makecontext already calls makecontext with uc_link == NULL
> but the function invoked in the context does explicitly call exit (0).
> Removing this enables the testcase to cover that problem as well.
>
> I've added this to my patch.
>
> Bye,
>
> -Andreas-
>
>
> 2012-07-12 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
>
> * sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c: Move
> __makecontext_ret to ...
> * sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S:
> ... here and call exit if uc_link is NULL. New file.
> * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Add
> __makecontext_ret.S.
> * sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c: Move
> __makecontext_ret to ...
> * sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S:
> ... here and call exit if uc_link is NULL. New file.
> * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Add
> __makecontext_ret.S.
> * stdlib/tst-makecontext.c: Remove explicit exit call.
Excellent. The testcase changes look good to me and match what
SuSv2 says about a returning from a context where uc_link is
zero e.g. "the thread will exit when this context returns."
I'm happy with this, thanks for enhancing the testcase to cover
the failure scenario.
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026