[Top][All Lists]

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

[avr-libc-dev] [patch #9553] Fix some issues in libc/

From: Georg-Johann Lay
Subject: [avr-libc-dev] [patch #9553] Fix some issues in libc/
Date: Wed, 24 Jan 2018 11:01:57 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0


                 Summary: Fix some issues in libc/
                 Project: AVR C Runtime Library
            Submitted by: gjlayde
            Submitted on: Wed 24 Jan 2018 04:01:56 PM UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



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.


File Attachments:

Date: Wed 24 Jan 2018 04:01:56 PM UTC  Name: avrlibc-libc.diff  Size: 2KiB  
By: gjlayde


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]