This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/19489] printing array from memory
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 18 Jan 2016 14:27:23 +0000
- Subject: [Bug tapsets/19489] printing array from memory
- Auto-submitted: auto-generated
- References: <bug-19489-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19489
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fche at redhat dot com
--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Thanks for your report.
The core of the problem appears to be our use of user_string_n2_quoted in the
syscall.write alias (see .../tapset/linux/syscalls2.stp), specifically the
interpretation of the "n". The function interprets it as a maximum, not an
exact buffer length (see [man function::user_string_n2_quoted]'s mention of C
strings).
We could revise the behaviour of that function to treat its input as a buffer
of definite size, if most or all other uses of that function would benefit.
In the interim, you can use
printf("%.*M", $count, $buf)
(note the ^ dot!)
--
You are receiving this mail because:
You are the assignee for the bug.