OCaml Java C++ C Objective-C Makefile Other
Clone or download
ezgicicek and facebook-github-bot Fix control var analysis for loops with multiple back-edges per loop …
…head

Summary:
I realized that control variable analysis was broken when we had multiple back-edges for the same loop. This is often the case when we have a switch statement combined with continue in a loop (see `test_switch` in `switch_continue.c`) or when we have disjunctive guards in do-while loops.

This diff fixes that by

- defining a loop by its loophead (the target of its backedges) rather than its back-edges. Then it converts back-edge list to a map from loop_head to sources of the loop's back-edges.
- collecting multiple guard nodes that come from potentially multiple exit nodes per loop head

In addition, it also removes the wrong assumption that an exit node belongs to a single loop head.

Reviewed By: mbouaziz

Differential Revision: D8398061

fbshipit-source-id: abaf288
Latest commit f80af7b Jun 18, 2018
Permalink
Failed to load latest commit information.
.travis Change license to MIT May 31, 2018
dependencies Change license to MIT May 31, 2018
docker Change license to MIT May 31, 2018
examples Change license to MIT May 31, 2018
facebook-clang-plugins @ f31f7c9 [clang] Remove dependency of mk_c_function from is_cpp May 31, 2018
infer Fix control var analysis for loops with multiple back-edges per loop … Jun 18, 2018
m4 Change license to MIT May 31, 2018
scripts [release] preparing for binary releases Jun 4, 2018
sledge Change license to MIT May 31, 2018
.buckconfig [infer][genrule] Add example of Buck DEFS macro to generate Infer ana… Dec 10, 2016
.clang-format fix sync mishaps Jun 21, 2016
.gitignore [release] preparing for binary releases Jun 4, 2018
.gitmodules [infer] Add facebook clang plugins submodule Aug 18, 2015
.inferconfig [java] Add command-line option to specify external Java packages Mar 2, 2018
.ocamlformat [ocamlformat] Upgrade to ocamlformat 0.5 Apr 18, 2018
.travis.yml [travis] fix travis and install Apr 19, 2018
CODE_OF_CONDUCT.md Add Code of Conduct Jan 16, 2018
CONTRIBUTING.md [istd] break IStd.ml into sensible components Mar 26, 2018
CONTRIBUTORS Inferbo Jan 31, 2017
DEFS [infer][genrule] add an option to make the genrule integration compat… May 10, 2018
FILES.md [trace] infer subcommand for inferTraceBugs Aug 4, 2017
INSTALL.md [docs] prefer to use `make install` Jun 5, 2018
LICENSE Change license to MIT May 31, 2018
Makefile [doc] add `doc-publish` target for publishing man pages and odoc Jun 7, 2018
Makefile.autoconf.in Change license to MIT May 31, 2018
Makefile.config Change license to MIT May 31, 2018
README.md Change license to MIT May 31, 2018
autogen.sh [release] preparing for binary releases Jun 4, 2018
build-infer.sh [release] preparing for binary releases Jun 4, 2018
configure.ac [release] preparing for binary releases Jun 4, 2018
dotbuckversion [buck] bump .buckversion Jan 9, 2018
install-sh [utils] Add CTypes binding of fts and implement remove_directory_tree Nov 20, 2016
opam Change license to MIT May 31, 2018
opam.lock [build] add conf-sqlite3 and fix minor script issue May 30, 2018

README.md

Infer Build Status

Infer is a static analysis tool for Java, C++, Objective-C, and C. Infer is written in OCaml.

Installation

Read our Getting Started page for details on how to install packaged versions of Infer. To build Infer from source, see INSTALL.md.

Contributing

See CONTRIBUTING.md.

License

Infer is MIT-licensed.

Note: Enabling Java support may require you to download and install components licensed under the GPL.