Summary:
When analyzing C model in C++, we were seeing some SKIP function triggered by generated constructors/operators= for C structs.
In C they weren't present, but in C++ compiler generates them for us. To avoid this (and future) problems
with models, translate all functions that are needed when computing the model
Reviewed By: dulmarod
Differential Revision: D3561873
fbshipit-source-id: f8ad2a0
Summary:
Generation of the module dependency graph was broken (all IR modules
were omitted) by the reason conversion.
Reviewed By: cristianoc
Differential Revision: D3541395
fbshipit-source-id: e5af125
Summary: Move Sil.dexp type and operations into separate DecompExp module.
Reviewed By: dulmarod
Differential Revision: D3548095
fbshipit-source-id: 5ab4360
Summary:
Move Sil.call_flags type and operations into separate CallFlags
module.
Reviewed By: dulmarod
Differential Revision: D3548086
fbshipit-source-id: 6d264e9
Summary: Move Sil.binop type and operations into separate Binop module.
Reviewed By: dulmarod
Differential Revision: D3548082
fbshipit-source-id: 356bee3
Summary: Move Sil.unop type and operations into separate Unop module.
Reviewed By: dulmarod
Differential Revision: D3548077
fbshipit-source-id: 49d3d83
Summary: Move Sil.const type and operations into separate Const module.
Reviewed By: dulmarod
Differential Revision: D3548073
fbshipit-source-id: 388d03e
Summary:
Remove recursion from strexp type and functions that is no longer
needed.
Reviewed By: dulmarod
Differential Revision: D3548070
fbshipit-source-id: c4999b7
Summary:
Remove recursion from dexp type and functions that is no longer
needed.
Reviewed By: dulmarod
Differential Revision: D3548068
fbshipit-source-id: 79de8b6
Summary:
Remove recursion from const type and functions that is no longer
needed.
Reviewed By: dulmarod
Differential Revision: D3548064
fbshipit-source-id: e123c24
Summary:
Move attribute values from const to exp. They are not constants, and
this reduces interdependence between Sil types.
Reviewed By: cristianoc
Differential Revision: D3548055
fbshipit-source-id: 31a9121
Summary: Use Prop.atom_negate in Rearrange instead of almost reimplementing it.
Reviewed By: sblackshear
Differential Revision: D3554171
fbshipit-source-id: 9baabc9
Summary:
The Aobjc_null attribute does not need a fully general exp. This diff
refines this to a possibly-empty path of fields starting from a pvar,
which reduces interdependence between Sil types.
Reviewed By: dulmarod
Differential Revision: D3548043
fbshipit-source-id: 49d16ab
Summary:
Move closure values from const to exp. They are not constants, and
this reduces interdependence between Sil types.
Reviewed By: sblackshear
Differential Revision: D3541364
fbshipit-source-id: 1a2f998
Summary:
Move exception values from const to exp. They are not constants, and
this reduces interdependence between Sil types.
Reviewed By: sblackshear
Differential Revision: D3541355
fbshipit-source-id: f22e0ba
Summary:
Move analyzer type and ops from Utils to Config, and simplify by
reducing interface. There are very few uses so no need to pollute
global namespace.
Reviewed By: sblackshear
Differential Revision: D3541047
fbshipit-source-id: 2be56af
Summary:
Backend has the same treatment for all Typ.Int types and so UnaryOperator
should be translated the same for all of them
Reviewed By: jvillard
Differential Revision: D3534277
fbshipit-source-id: 8569b65
Summary: Change length of Dsizeof from an exp to a dexp. This make a little progress toward reducing the types that must be mutually recursive with exp.
Reviewed By: sblackshear
Differential Revision: D3541337
fbshipit-source-id: 95d1f70
Summary:
Simplify config implementation to make it easier to define new
executables.
Reviewed By: martinoluca
Differential Revision: D3529213
fbshipit-source-id: 71324a2
Summary:
Document how to define new command line and config file options, and
slight cleanup.
Reviewed By: jvillard
Differential Revision: D3528952
fbshipit-source-id: 6bd7601
Summary:
Call infer with `--unsafe-malloc` or set `unsafe-malloc: true,` in .inferconfig to
have infer assume that `malloc()` never returns null.
closes#389
Reviewed By: jberdine
Differential Revision: D3522169
fbshipit-source-id: 6b88a16
Summary: `Config.abs_val` was always set to 2 instead of taking its value from the option.
Reviewed By: jberdine
Differential Revision: D3515024
fbshipit-source-id: fa27396
Summary:
Simplify DB initialization by removing some unit functions, since
Config values are now already initialized at module load time.
Reviewed By: akotulski
Differential Revision: D3522728
fbshipit-source-id: ac93d30
Summary:
To specify a new flag to run some test using our framework, one currently has
to add a new argument to the method that runs Infer and modify existing methods
to give a default value to that argument everywhere. With this diff, it's
possible to just specify extra arguments as parameters to
`createCInferCommand()` et al.
Reviewed By: martinoluca
Differential Revision: D3522161
fbshipit-source-id: 1499fc2
Summary:
Use resolve instead of filename_to_absolute, to resolve relative paths
in command line arguments with respect to the working directory infer
is initially invoked from, rather than the possibly-changed current
working directory of the child processes.
Also use initial instead of current working dir for default
project_root and results_dir
Reviewed By: martinoluca
Differential Revision: D3467571
fbshipit-source-id: fbb0f3f
Summary:
In InferPrint, ignore non-existent dirs when looking for specs. This
allows InferPrint to work when the results dir does not exist.
Reviewed By: sblackshear
Differential Revision: D3522757
fbshipit-source-id: 5ef905d
Summary:
Create log dir only if results_dir exists, otherwise, log to standard
output and error even in developer mode.
Reviewed By: sblackshear
Differential Revision: D3522737
fbshipit-source-id: e00571b
Summary:
There is nice hook inside glog/logging.h for all CHECK_(GT|LT|GE|...) macros.
This simplifies AST significantly which makes infer way more happy:
cda16b3443/src/glog/logging.h.in (L722-L724)
Reviewed By: jberdine
Differential Revision: D3522110
fbshipit-source-id: 70c94cb
Summary:
This call was producing confusing false positives when deleted object was possible to be null.
Changing frontend to add that check is not trivial so I turned it off for now (we don't handle
destructors in other cases anyway)
Reviewed By: dulmarod
Differential Revision: D3509354
fbshipit-source-id: c23dc81
Summary: Emit a simple info message on terminal whenever aggregation of stats fails for whatever reason, details about the failure will still be available in `toplevel.log`
Reviewed By: jvillard
Differential Revision: D3516339
fbshipit-source-id: fe24d64
Summary: lambdaExpr now has more information, make infer compile with that new version
Reviewed By: dulmarod
Differential Revision: D3515291
fbshipit-source-id: d239bd3
Summary:
When clang instantiates template function with argument pack, it will
give the same name to all parameters coming from the pack. To avoid
name collisions, always add index of argument's position to mangled part
of the variable.
Seemingly unrelated changes are to make existing tests pass (don't use
simple variable name where it matters)
Reviewed By: dulmarod
Differential Revision: D3503608
fbshipit-source-id: 794093a
Summary:
InferPrint used to:
1. always print specs to stdout
2. not require --results-dir to be present
3. if invoked with .spec file, print just that file (that broke long time ago I think)
This diff fixes only (1) as this is most annoying and easiest part, but the rest should be fixed as well
Reviewed By: sblackshear
Differential Revision: D3504015
fbshipit-source-id: 469b46f
Summary: in text mode (`pp_stats`), we print it and so we probably should to the same for html
Reviewed By: jvillard, sblackshear
Differential Revision: D3497678
fbshipit-source-id: 3d47d2a
Summary: Those functions have simple enough implementations for infer to understand them
Reviewed By: jvillard
Differential Revision: D3463084
fbshipit-source-id: f84160f
Summary:
This diff changes the toplevel 'infer' executable from the current
python script to an OCaml binary. Currently this executable only parses
command line arguments, sets up environment variables, and invokes the
existing python script. This improves infer's command-line and
configuration interface, since passing arguments to the frontends or
backend no longer requires manually setting environment variables, and
arguments for the toplevel can now also be specified in .inferconfig.
Simplification and migration of functionality from the python script is
left for the future.
Reviewed By: martinoluca, jvillard
Differential Revision: D3450662
fbshipit-source-id: 1b52302
Summary:
1. Fetch newest changes to ast exporter. Now we'll hash template instantiations inside declaration names if their string representation is too long (ie. 40 characters)
2. Increase biniou buffer to allow for long type names - they happen when dumping type raw name with long template instantiation (it's not hashed there yet, but infer doesn't use `ti_raw` field much
Reviewed By: dulmarod
Differential Revision: D3462743
fbshipit-source-id: 9152ae5
Summary: Move the initialization code for Logging into the Logging module.
Reviewed By: sblackshear
Differential Revision: D3466751
fbshipit-source-id: 9e79c5b
Summary: They were reusing same type and it lead to wrong type in cache for one of them
Reviewed By: jvillard
Differential Revision: D3462759
fbshipit-source-id: 8e10678
Summary:
Deabbreviate CommandLineOption.exe type constructors, which correspond
to the various infer executables.
Reviewed By: cristianoc
Differential Revision: D3455942
fbshipit-source-id: f25ed77
Summary:
The code to set the minor heap size confused bytes and words, and so was
off by a factor 8. Fortunately it attempted to set the minor heap to
1MB and got the better value of 8MB instead.
Reviewed By: cristianoc
Differential Revision: D3455937
fbshipit-source-id: 48d0e23
Summary: Infer should be responsible for ensuring that `-j` is respected.
Reviewed By: jberdine
Differential Revision: D3450064
fbshipit-source-id: 5286a6a