Skip to content

Commit

Permalink
fix issue 829
Browse files Browse the repository at this point in the history
Needed to make array initialized to null before bpf_probe_read as the
verifier was rejecting the original code. will probably need to fix the
tutorial as well
  • Loading branch information
affansyed committed Dec 9, 2016
1 parent 2a3a375 commit ce1ce3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/tracing/nodejs_http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <uapi/linux/ptrace.h>
int do_trace(struct pt_regs *ctx) {
uint64_t addr;
char path[128];
char path[128]={0};
bpf_usdt_readarg(6, ctx, &addr);
bpf_probe_read(&path, sizeof(path), (void *)addr);
bpf_trace_printk("path:%s\\n", path);
Expand Down

0 comments on commit ce1ce3f

Please sign in to comment.