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 runtime/11277] New: _stp_text_str uses bad octal escapes


The first issue is that it uses variable-length escapes.  The second argument
has two characters in this example, but you can't see the difference in our
output.  We should always output 3-digit octal so there's no ambiguity.

$ stap -e 'probe syscall.execve { println(args) }' -c $'/bin/true \016 \0016'
"/bin/true" "\16" "\16"


The second issue is that the upper digits are detected by checking "if (c >
077)", but since c is a signed char, this fails on "negative" chars (as found in
utf-8).

$ stap -e 'probe syscall.execve { println(args) }' -c $'/bin/true \342\230\240'
"/bin/true" "\2\0\0"

-- 
           Summary: _stp_text_str uses bad octal escapes
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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