#350 msp430-libc *printf mis-uses va_start/va_end

4.7.x_development
open
nobody
None
5
2013-06-23
2013-03-31
Peter A. Bigot
No

va_end() must be called from the same function that calls va_start(). This is not done for sprintf() and other functions.

Related

Bugs: #354

Discussion

  • Oliver
    Oliver
    2013-06-22

    We found issues with mspgcc 4.7.0 that may be related to sprintf.

    Could you add a simple example to trigger this bug here?

     
  • Peter A. Bigot
    Peter A. Bigot
    2013-06-23

    Actually, I can't; the issue was discovered by inspection within embtextf, not by encountering an actual problem. I don't have a patch prepared for msp430-libc yet, but the solution will be similar to the approach taken in https://github.com/pabigot/embtextf/blob/master/src/libc.c if you'd like to try that locally to see if it fixes the problem.