Skip to content

Assignments within conditional expressions should kill widened bounds #891

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

Closed
secure-sw-dev-bot opened this issue Jan 16, 2022 · 2 comments

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#895


Expressions within a conditional operator that modify variables used in a widened bounds expression currently do not kill the widened bounds. For example,

void f(nt_array_ptr<char> p : count(i), unsigned i, int flag) {
  if (*(p + i)) {
    // The i++ expression should kill the widened bounds of p.
    flag ? i++ : i;
  }
}
@secure-sw-dev-bot
Copy link
Author

Comment from @mgrang:

Fixed in checkedc/checkedc-clang#898

@secure-sw-dev-bot
Copy link
Author

Comment from @mgrang:

@kkjeer Could you please verify if the above PR fixes the issue?

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