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 bpf/23816] New: printf with multiple %s does not work on bpf


https://sourceware.org/bugzilla/show_bug.cgi?id=23816

            Bug ID: 23816
           Summary: printf with multiple %s does not work on bpf
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: me at serhei dot io
  Target Milestone: ---

Try e.g.:

function foo() { return "test" }

probe kernel.function("vfs_read") {
  printf("K 1 %s\n", foo()) // <- this worked
  printf("K 2 %s\n", "test") // <- this worked
  printf("K 3 %s %s\n", foo(), "test") // <- this didn't
  printf("K 4 %s %s\n", "test", "test") // <- this didn't
  printf("K 5 %s %s\n", foo(), foo()) // <- this didn't
  printf("K 6 %s", "test") printf(" %s\n", "test") // <- this did
  printf("K %d %s\n", 7, "test") // <- this did
  exit()
}

In kernel, many of the printf's will be swallowed.

In userspace, output might be incorrect (e.g. string3.stp newly committed to
testsuite).

-- 
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]