Summary:
Fix the logic for computing duplicate symbols. It was broken at some point and some duplicate symbols creeped into our tests. Fix these, and add a test to avoid duplicate symbols detection to regress again.
Also, this removes one use of `Cfg.load`, on the way to removing file-wide CFGs from the database.
Reviewed By: ngorogiannis
Differential Revision: D10173349
fbshipit-source-id: a0d2365b3
Summary:
Also changes `clang_plugin_test` so that it also runs the clang-ocaml tests, and add a new `clang_plugin_test_replace` target.
The controller you requested could not be found.: facebook-clang-plugins
Reviewed By: jberdine
Differential Revision: D10141902
fbshipit-source-id: 927c55a4f
Summary:
The method matcher is now used sufficiently it warrants refactoring out into its own module.
Also, kill dev-android-strict-mode and leave starvation-strict-mode as the stronger option.
Reviewed By: jeremydubreil
Differential Revision: D9990753
fbshipit-source-id: 626a70a19
Summary:
This allows infer devs to see the effects their changes have on the infer manuals.
Check in the manuals for each subcommand + the output of `--help-full` to get a
complete picture. If this is too annoying we can also check in only
`--help-full`.
Reviewed By: mbouaziz
Differential Revision: D9916404
fbshipit-source-id: b981e2c33
Summary:
Turn off by default until mature enough.
Also rename the dev-strict-mode test dir to highlight the dev part.
Reviewed By: mbouaziz
Differential Revision: D9775571
fbshipit-source-id: c3a41bbdf
Summary:
First step in writing an analyzer that is meant to run only on Android core library implementation.
This will, when finished, compute the library entrypoints that may lead to a strict mode violation.
The normal analyzer will use those to statically flag strict mode violations in app code.
Strict Mode is an Android debug mode, where doing certain things (like disk read/write or network activity) on the UI thread will raise an exception. We want to statically catch these, as well as indirect versions (the UI thread takes a lock and another thread holding that lock calls a method that would be a strict mode violation).
Reviewed By: mbouaziz
Differential Revision: D9634407
fbshipit-source-id: c30bcedb3
Summary:
Some paths are hardcoded in infer as being relative to the current executable,
for instance the directory where to find the models. By copying infertop.bc to
infer/bin like we do for `infer` these relative paths lead to the expected
place, which means models can be loaded in the toplevel like they would be in a
normal infer execution. This is more useful for debugging than previously.
Reviewed By: jeremydubreil, mbouaziz
Differential Revision: D9197142
fbshipit-source-id: 48c4f82fb
Summary:
This makes sure that the javac_jar is disabled when setting the external compiler option to point at the Infer wrapper
Closes#976
Reviewed By: jvillard
Differential Revision: D9193336
fbshipit-source-id: abafb51fc
Summary:
See the results online!
http://fbinfer.com/docs/man-pages.htmlhttp://fbinfer.com/docs/internal-API.html
These html pages are written by hand, but their target is auto-generated.
I cheated a bit by generating the docs for the current version of infer and not
0.15.0 but they are hopefully very similar.
Depends on D8314572
Reviewed By: jeremydubreil
Differential Revision: D8318132
fbshipit-source-id: ffca43c
Summary:
`make doc` will use `jbuilder` (which in turn uses `odoc`) to generate the
documentation for infer's modules. This is useful to browse the APIs of infer
and gives a more discoverable place to host more general documentation about
infer's internals.
Besides the actual plumbing necessary to generate the docs, this diff also
- Moves the various infer/src/*/README.md to index.mld files that make it to the generated docs
- Fixes some doc comments that would anger `ocamldoc`
Closes#435
Reviewed By: mbouaziz
Differential Revision: D8314572
fbshipit-source-id: 4a5c70e
Summary: The clang distribution uses symlinks in some places, which avoids copying rather large binaries. `make install` was replacing these with actual copies. Try not to be so wasteful anymore.
Reviewed By: mbouaziz
Differential Revision: D8260777
fbshipit-source-id: eccabab
Summary:
Change the documentation to refer to (upcoming) binary releases. Update the
scripts to treat .release differently: now we want to build clang and the
plugins even in release mode, as that's just the preparation for the release
tarball containing only binaries.
Reviewed By: mbouaziz
Differential Revision: D8235388
fbshipit-source-id: bfb4ae8
Summary:
New script to create binary releases instead of just packaging clang + facebook clang plugins.
Basically calls `make install` into a directory and tars it.
Reviewed By: mbouaziz
Differential Revision: D8204034
fbshipit-source-id: b664129
Summary:
Change the license of the source code from BSD + PATENTS to MIT.
Change `checkCopyright` to reflect the new license and learn some new file
types.
Generated with:
```
git grep BSD | xargs -n 1 ./scripts/checkCopyright -i
```
Reviewed By: jeremydubreil, mbouaziz, jberdine
Differential Revision: D8071249
fbshipit-source-id: 97ca23a
Summary: Set arguments of pointer type as initialised for indirect function calls.
Reviewed By: mbouaziz
Differential Revision: D8097895
fbshipit-source-id: 830f568
Summary: Follow C++ in having local variables owned plus silence reports on paths rooted on logical vars. We need both because when propagating ownership from right to left, the initial status of a temp var as owned is lost.
Reviewed By: sblackshear
Differential Revision: D7988575
fbshipit-source-id: 2e817d7
Summary: I needed it for debugging but, to my dismay, it was borked again. This time it was because `jbuilder` moved the object files to another directory since the last jbuilder update.
Reviewed By: mbouaziz
Differential Revision: D7926267
fbshipit-source-id: 42ad26a
Summary:
`brew install opam` is unhappy and wants us to run `brew unlink python`
beforehand so do that.
The `make install` logic in infer had a problem of nested `if` logic.
Reviewed By: da319
Differential Revision: D7686760
fbshipit-source-id: dd0c988
Summary:
Upgrade ocamlformat, and base which needs to be done in sync in order to build
ocamlformat, and the other deps can come for the ride.
Reviewed By: jvillard
Differential Revision: D7663537
fbshipit-source-id: 3e90970
Summary:
This was meant to be part of D7569054 but the wrong version landed.
classicblunder
Reviewed By: mbouaziz
Differential Revision: D7615865
fbshipit-source-id: a29b3af
Summary:
Making the shell stricter revealed a bug in `make devsetup`:
`shell_config_file` can be used without being initialised. Also, the error path
when testing if `BUILD_MODE` was set to default was wrong and would execute all
except the first `echo` command unconditionally. I changed the test so that it
tests only if `BUILD_MODE` is set in the environment.
Reviewed By: martinoluca
Differential Revision: D7615333
fbshipit-source-id: 08c5eb0
Summary:
Lost in D7569054: because `-e` is set, the command to run needs to be wrapped a
bit more carefully to continue the execution in case of failure and get to the
part where we print the error messages on the console.
Reviewed By: mbouaziz
Differential Revision: D7599442
fbshipit-source-id: 65f6bf7
Summary:
Run with `SHELL = bash -e -u -o pipefail` to catch many kinds of failures. We
were silently failing during `make install` because of some missing escaping,
and the failure was hidden because it was happening inside a bash `for` loop.
This fixes the escaping issue and makes sure such issues will result in an
error as of now.
Also removes dangerous `find -exec` instances: `find` will `exit 0` event if
some commands failed.
Fixes#887
Reviewed By: mbouaziz
Differential Revision: D7569054
fbshipit-source-id: 542fe50
Summary:
The dead code checker slows down the test suite notably, and can be annoying
when you're in the middle of a change.
Depends on D7443825
Reviewed By: mbouaziz, ngorogiannis
Differential Revision: D7443881
fbshipit-source-id: 746cf6e