This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/13999] New: pretty-printing shouldn't use %c
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 19 Apr 2012 14:18:27 +0000
- Subject: [Bug translator/13999] New: pretty-printing shouldn't use %c
- Auto-submitted: auto-generated
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.