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/

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

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>


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 gjlayde (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-24 gjlayde Attached File- => Added avrlibc-libc.diff, #43066

    Back to the top

    Powered by Savane 3.5