[Bug bpf/23816] New: printf with multiple %s does not work on bpf

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/23816] New: printf with multiple %s does not work on bpf

albert.aribaud at 3adev dot fr
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.
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/23816] printf with multiple %s does not work on bpf

albert.aribaud at 3adev dot fr
https://sourceware.org/bugzilla/show_bug.cgi?id=23816

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|systemtap at sourceware dot org    |me at serhei dot io

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