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

Bug: if (C){...} else if (C) {} pattern is found. The second one cannot be reached. #4625

Closed
ustchcs-bugfinder opened this issue Aug 12, 2020 · 2 comments

Comments

@ustchcs-bugfinder
Copy link

ustchcs-bugfinder commented Aug 12, 2020

} else if (u.re.is_complement(re)) {

        } else if (u.re.is_range(re)) {
            return true;
        } else if (u.re.is_full_char(re)) {
            return true;
        } else if (u.re.is_full_seq(re)) {
            return true;
        } else if (u.re.is_complement(re)) { // line 842
            // TODO can we do better?
            return false;
        } else if (u.re.is_intersection(re)) {
            return false;
        } else if (u.re.is_complement(re)) {    // Same as the condition on line 842
            return false;
        } 

Reported by: USTCHCS Analysis Toolsuite Bugfinder
(bugfinder-2.3: The use of if (C) {…} else if (C) {…} pattern should not be used.)

@mtrberzi
Copy link
Collaborator

Opened #4629

@ustchcs-bugfinder may we have some more information about your tool please and how to contact the authors?

@ustchcs-bugfinder
Copy link
Author

ustchcs-bugfinder commented Aug 13, 2020

Opened #4629

@ustchcs-bugfinder may we have some more information about your tool please and how to contact the authors?

Hi, mtrberzi. We are a startup company with a team from Software Safety Lab. of University of Science and Technology of China. So our tool is quite "new". But we are glad you are interested in the result our tool reported.

Last week, we also did an analysis on LLVM/Clang code. Here is a bug list we reported.

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 a pull request may close this issue.

2 participants