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

Add user-friendly error for multiple for loops #3233

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

viktormalik
Copy link
Contributor

@viktormalik viktormalik commented Jun 11, 2024

Currently, we do not allow for-loops to be used from multiple probes at the same time (see #3021 for details). If that happens, detect it in the semantic analyser and print a nice error instead of a generic Error loading program.

Checklist
  • Language changes are updated in man/adoc/bpftrace.adoc
  • User-visible and non-trivial changes updated in CHANGELOG.md
  • The new behaviour is covered by tests

@viktormalik
Copy link
Contributor Author

Not updating the changelog as for loops are not released, yet.

@viktormalik viktormalik added this to the v0.21.0 milestone Jun 11, 2024
@danobi
Copy link
Member

danobi commented Jun 11, 2024

Semantic analyser unit test? It'd help make more clear what we are preventing.

@viktormalik
Copy link
Contributor Author

Semantic analyser unit test? It'd help make more clear what we are preventing.

Yeah, I was reluctant to add it as this is a "missing feature" but with the test, we'll also get notified when we fix the issue. Added.

Currently, we do not allow for-loops to be used from multiple probes at
the same time (see [1] for details). If that happens, detect it in the
semantic analyser and print a nice error instead of a generic "Error
loading program".

[1] bpftrace#3021
@viktormalik viktormalik merged commit cdf9e9d into bpftrace:master Jun 19, 2024
17 checks passed
@viktormalik viktormalik deleted the multiple-for-error branch June 28, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants