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

Segmentation fault in a program with return in a nested loop #72

Open
sallaigy opened this issue Dec 17, 2020 · 0 comments
Open

Segmentation fault in a program with return in a nested loop #72

sallaigy opened this issue Dec 17, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@sallaigy
Copy link
Member

Translating the following program results in a segmentation fault:

int *a;
int b;
int c(int e, int *g) {
  for (;;)
    for (b = 1; e; b++)
      if (a[b]) {
        *g = b;
        return 1;
      }
}
int main() { int d, f = c(d, &f); }

This is caused by the value of variable being null in ModuleToAutomata.cpp:448

@sallaigy sallaigy added the bug Something isn't working label Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant