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

Inconsistent program state with loops and strict equality #611

Closed
inverno opened this issue Jun 19, 2017 · 1 comment
Closed

Inconsistent program state with loops and strict equality #611

inverno opened this issue Jun 19, 2017 · 1 comment
Labels
type: bug Exceptions and blocking issues during analysis

Comments

@inverno
Copy link
Contributor

inverno commented Jun 19, 2017

The following code produces an inconsistent program state that results in the if condition resulting in neither a true branch nor a false branch (see the comment in the code)

function main(size) {
    var j;
    while (cond) {
        for (j = 0; j < size; j++) {
            if (target) {
                break;
            }
        }

        if (j === size) { // PS: size=0, j=zero, j < size
            foo();
        }
    }
}
@inverno inverno added type: bug Exceptions and blocking issues during analysis code modelization labels Jun 19, 2017
@inverno inverno modified the milestone: 3.2 Jun 29, 2017
@vilchik-elena vilchik-elena modified the milestones: 3.3, 3.2 Sep 13, 2017
@inverno inverno added the ready label Oct 26, 2017
@vilchik-elena vilchik-elena removed this from the 3.3 milestone Nov 1, 2017
@saberduck
Copy link
Contributor

not relevant anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Exceptions and blocking issues during analysis
Projects
None yet
Development

No branches or pull requests

3 participants