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: [PATCH] S/390: Fix makecontext with uc_link == NULL


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



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