more patches more newlib-1.16.0 : setjmp & longjmp for 4.9 branch

Kate Feng feng1 at bnl.gov
Mon Mar 2 21:30:58 UTC 2009


Ralf Corsepius wrote:
> Kate Feng wrote:
>> Hi,
>>
>> Attached is the patches for newlib-1.16.0.  The setjmp() and longjmp()
>> are broken, which could affect their function in the 4.9. branch.
>> The patch for the setjmp.S is only for powerPC port, which was tested
>> for my applications.  The path for the setjmp.h should be applied to
>> all platforms.
>
> Some questions:
>
> * Which bug is this patch supposed to fix?
> Please elaborate.
>
> * Whatever you are trying to fix, is almost certainly not RTEMS 
> specific but architecture specific
> => Your use of  __rtems__ is not the "right way" to do it.
>
The machine/powerpc/setjmp.S file is probably only linked to powerPC port.
Thus, it's  probably OK.  However, setjmp() , when called, will trigger 
the error
message of :
"In BSP_exceptionHandler()
Uhuuuh, Exception 10 in unknown task???".
Using  sigsetjmp(buf, 1) did not solve the problem.  Thus,
I simply apply the patch from the newlib1.15.0, which I used for the
RTEMS4.8.0.  Perhaps, it was implemented wrongly in 4.8 , instead ?

I agree with you that the patch fixes the problem, but ties its function 
to architecture
specific.  At this point, I do remember reading about that 'setjmp' and 
'longjmp'
should be used carefully that there are  other more graceful ways to 
handle it.
This is my memory from last century that I guess I would have to dig 
into for
the more elegant solution........

Thanks a lot for your pointer.  Perhaps, it is better not to apply the 
patch so that
it does not add architecture specific patch......  Please advise.

Regards,
Kate
>
>
> Ralf
>

>
> Ralf
>




More information about the users mailing list