[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Kate Feng wrote:
> 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.
>>
>>     
I think I remember this patch and there was some reason
you needed to know you were in supervisor mode in the
environment to do it.  That's what the __rtems__ was for.

I don't recall what the purpose of the patch is though
> 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
>>
>>     
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985