Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For-loops do not handle BPF context #3182

Open
ajor opened this issue May 17, 2024 · 0 comments
Open

For-loops do not handle BPF context #3182

ajor opened this issue May 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working priority: high
Milestone

Comments

@ajor
Copy link
Member

ajor commented May 17, 2024

Latest bpftrace will SEGV when compiling scripts which attempt to access the BPF context from the body of a for-loop:

kprobe:do_nanosleep
{
  @map[0] = 1;
  for ($kv : @map) {
    arg0; // requires ctx access
  }
}

I think BPF context will have to be passed into the callback subprogram, similarly to variables (#3014).

@ajor ajor added bug Something isn't working priority: high labels May 17, 2024
@ajor ajor added this to the v0.21.0 milestone May 17, 2024
@ajor ajor self-assigned this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high
Projects
None yet
Development

No branches or pull requests

1 participant