This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/13999] New: pretty-printing shouldn't use %c


http://sourceware.org/bugzilla/show_bug.cgi?id=13999

             Bug #: 13999
           Summary: pretty-printing shouldn't use %c
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: fche@redhat.com
    Classification: Unclassified


Further to bug #13998, we shouldn't use %c for pretty-printing plain char types
either, or at least not directly, because the char values may include
non-isgraph() bits.  Consider 

sprintf(".... foo=%c ....", /* ... */ , 0 , /* .... */);

Then %c will insert a \0 into the output stream, and cause loss of all later
fields.  We either need a printf formatting variant that escapes non-isprint()
chars (%C?), or the pretty-printer needs to switch to a non-character output
such as %u.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]