{"action":"created","issue":{"url":"https://api.github.com/repos/iovisor/bcc/issues/219","labels_url":"https://api.github.com/repos/iovisor/bcc/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/219/comments","events_url":"https://api.github.com/repos/iovisor/bcc/issues/219/events","html_url":"https://github.com/iovisor/bcc/issues/219","id":106831268,"number":219,"title":"Need a bpf_get_current_comm example","user":{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars.githubusercontent.com/u/1101211?v=3","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-16T18:19:30Z","updated_at":"2015-09-16T21:37:00Z","closed_at":"2015-09-16T21:37:00Z","body":"I don't know if I'm using bpf_get_current_comm incorrectly, or if it doesn't work. My code:\r\n\r\n```C\r\nBPF_HASH(commbyreq, struct request *, char *);\r\n\r\nint trace_start(struct pt_regs *ctx, struct request *req) {\r\n        char comm[TASK_COMM_LEN];\r\n        if (bpf_get_current_comm(&comm, sizeof(comm))) {\r\n                commbyreq.update(&req, (char **)&comm);\r\n        }\r\n}\r\n```\r\n\r\n```Shell\r\ninvalid indirect read from stack off -48+0 size 16\r\n```\r\n\r\nIt's complaining about the bpf_get_current_comm() line."},"comment":{"url":"https://api.github.com/repos/iovisor/bcc/issues/comments/140901639","html_url":"https://github.com/iovisor/bcc/issues/219#issuecomment-140901639","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/219","id":140901639,"user":{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars.githubusercontent.com/u/1101211?v=3","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T21:37:00Z","updated_at":"2015-09-16T21:37:00Z","body":"ok, now works, thanks!"}}