[Bug bpf/23816] New: printf with multiple %s does not work on bpf
me at serhei dot io
sourceware-bugzilla@sourceware.org
Wed Oct 24 20:01:00 GMT 2018
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.
More information about the Systemtap
mailing list