patchAVR C Runtime Library - Patches: patch #9553, Fix some issues in libc/

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9553: Fix some issues in libc/

Submitter:  Georg-Johann Lay <gjlayde>
Submitted:  Wed 24 Jan 2018 04:01:56 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  joerg_wunsch Open/Closed:  Closed

Thu 20 May 2021 09:51:51 PM UTC, comment #1: 

thanks, applied in r2553

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 24 Jan 2018 04:01:56 PM UTC, original submission:  

This patch fixes some build warnings and a potential wrong-code issues in GETBYTE as used by vfprintf and vfscanf:

Inline asm operand %0 might override operand %2 as the compiler may assign the same hard register to either operands.  Hence, %0 needs an early-clobber constraint so that setting %0 will never set %2 (%2 is used after the first set of %0).  Presumably, this has never led to a problem because %2 is used in a loop and is not dead after the asm, yet it is a potential bug.


        * libc/stdio/vfscanf.c (GETBYTE) [LPMx]: Early-clobber %0.
        (GETBYTE) [default]: Use shorter instruction sequence.
        * libc/stdio/vfprintf.c: Same.
        (vfprintf): Fix build-warnings.
        * libc/stdlib/dtostre.c (dtostre): Fix build warning.
        * libc/stdlib/getenv.c (getenv): Fix build warning.


Georg-Johann Lay <gjlayde>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #43066:  avrlibc-libc.diff added by gjlayde (2KiB - text/x-patch - patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by gjlayde (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-20 joerg_wunsch StatusNone Done
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2018-01-24 gjlayde Attached File- Added avrlibc-libc.diff, #43066

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code