bugAVR C Runtime Library - Bugs: bug #35366, Bad behaviour for fprintf_P...

 
 

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

bug #35366: Bad behaviour for fprintf_P function

Submitter:  Damien Espitallier <espitall>
Submitted:  Wed 25 Jan 2012 01:28:32 PM UTC
   
 
Category:  Library Severity:  3 - Normal
Priority:  5 - Normal Item Group:  libc code
Status:  Works For Me Assigned to:  None
Percent Complete:  0% Open/Closed:  Closed
Release:  1.7.1 Fixed Release:  None

Mon 30 Jan 2012 09:25:35 AM UTC, comment #2: 

I haven't the bug with your test files.
I've probably wasted your time for a bug in my own code, even if I really don't see where.

You can close this bug, if I can reproduce with your test files, I will reopen the bug.

Really sorry.

Damien Espitallier <espitall>
Sat 28 Jan 2012 05:38:55 AM UTC, comment #1: 

Hm... I can not reproduce this behavior.
The attempts are added to Avr-libc:
    tests/regression/bug-35366-*.c

Dmitry Xmelkov <dmix>
Group administrator
Wed 25 Jan 2012 01:28:32 PM UTC, original submission:  

In order to print a single '%' character with fprintf_P, I must put %%%% in my format string.

A string format "e1=%f %% e2=%f" seems to be interpreted as if I wrote "e1=%f % e2=%f" (which create a false %e token and corrupt my output)

It seems that the string format is parsed twice, so the only way I found to have my single % is to add two extra %

The vnsprintf function has the same bug (but not the simple printf function)

I use the 1.7.1 version provided by atmel but I didn't see any trace of this bug in changelog of newer versions.

Damien Espitallier <espitall>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Updated the item)
  • -email is unavailable- added by dmix (Posted a comment)
  • -email is unavailable- added by espitall (Submitted the item)
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-30 arcanum StatusNone Works For Me
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code