This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570 4.9.1 rts Library Math function cause Heap (_Feraise)

TMS570 4.9.1 

I am using the library rtsv7R4_T_be_v3D16_eabi.lib and by default, it is pulling in the references to feraiseexcept.  This results to references to fputs to stderr and ultimately malloc which causes the linker to create a heap section.

I can confirm that 4.6.4 rtsv7r4_t_be_v3d16_eabi.lib did not cause this to happen.

1. Is rtsv7r4_t_be_v3d16_eabi.lib _Feraise configured to use MATH_ERREXCEPT
2. If configured to use it, will there be version that doesn't, and why was this changed from 4.6.4.
3. If configured not to use it, why is 4.9.1 pulling in the requirement for a heap. 

If MATH_ERREXCPET is correctly configured for the library, should we build the library ourselves with it disabled?  Is it possible to get a list of settings rtsv7R4_T_be_v3D16_eabi.lib used as a baseline for this build?

edit: I found this specifically in the ldexp function.

  • We changed the underlying implementation the C standard library math functions, and this was an unexpected side effect.  This is a known issue, and we are investigating a solution to this problem, but it will not be available right away.

    See SDSCM00042541 for workarounds when they become available.

     

  • Daniel,

    The library is configured to use MATH_ERREXCEPT by default. You should be able to change to change this in math.h and recompile the RTS to remove the calls to feraiseexcept(). You can also remove the calls to fputs in raise.c, which are really what is responsible for pulling in malloc.

    I plan to fix this issue in the RTS by removing the calls to fputs in raise.c. The fix will go in the 4.9.4 version of the compiler.

  • Okay, thanks for the info of when it was going to be fixed.  For the time being I have removed feraiseexcept from the library and implemented an empty function in my project.  If it makes more sense, I can pull fputs from the library.