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

Verifier get stuck on nested-loops termination check #521

Open
absagar1 opened this issue Jul 25, 2023 · 0 comments
Open

Verifier get stuck on nested-loops termination check #521

absagar1 opened this issue Jul 25, 2023 · 0 comments

Comments

@absagar1
Copy link

Unable to get past the verifier with the loops shown below. It causes the verifier to keep running and not finish.

`int loop_test() {
int sum;

for (int i = 0; i < 11; i++) { // WORKAROUND: Removing this loop allows verification to finish in ~1.5mins
    for (int j = 0; j < 11; j++) {
        for (int k = 0; k < 16; k++) {
            for (int l = 0; l < 16; l++) {
                for (int m = 0; m < 3; m++) {
                    for (int n = 0; n < 3; n++) {
                       // do some processing which relies on each loop iteration.
                        int idx = (i + j + k + l + m + n) % TOTAL_MYMAP_ENTRIES;
                        uint8_t* x_ptr = bpf_map_lookup_elem(&mymap, &idx);
                        if (x_ptr != NULL) {
                            sum += *x_ptr;
                        }
                    }
                }
            }
        }
    }
}

return sum;

}`

Alan-Jowett added a commit to Alan-Jowett/ebpf-verifier that referenced this issue Oct 15, 2024
)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@b611370...4fa2a79)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Jowett <[email protected]>
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

No branches or pull requests

1 participant