From ce1ce3f8b0fed3473c420f65bd3b1850742e6426 Mon Sep 17 00:00:00 2001 From: affansyed Date: Fri, 9 Dec 2016 09:04:52 +0500 Subject: [PATCH] fix issue 829 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 --- examples/tracing/nodejs_http_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tracing/nodejs_http_server.py b/examples/tracing/nodejs_http_server.py index 65957f43aba4..1017de563040 100755 --- a/examples/tracing/nodejs_http_server.py +++ b/examples/tracing/nodejs_http_server.py @@ -23,7 +23,7 @@ #include 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);