Sungkeun Cho
0086c34364
[inferbo] Add symbolic locations for parameters
...
Summary:
It adds symbolic locations for paramters, which will be used for fixing instantiations of parameters in the
following diffs.
Reviewed By: mbouaziz, jvillard
Differential Revision: D13214293
fbshipit-source-id: f016ea4c3
6 years ago
Ezgi Çiçek
a835a3511d
[logging] Log unanalyzed procedures
...
Reviewed By: mbouaziz
Differential Revision: D13083766
fbshipit-source-id: 3e6eb36a4
6 years ago
Jules Villard
9510549cf6
[ios] kill flaky linter test
...
Summary: Delete function that would get a linter warning or not depending on the version of Xcode.
Reviewed By: martintrojer
Differential Revision: D13215750
fbshipit-source-id: 886ce397d
6 years ago
Jules Villard
ecbe8eca76
[pulse] remove nullptr model
...
Summary: It is not used yet and still manages to cause false positives.
Reviewed By: mbouaziz
Differential Revision: D13102948
fbshipit-source-id: 2122666c2
6 years ago
Jules Villard
1c668c4d41
[SIL][preanalysis] add call flag for functions treating first formal as return
...
Summary: This helps some checkers and the liveness preanalysis.
Reviewed By: da319
Differential Revision: D13102954
fbshipit-source-id: b8d3c5fe2
6 years ago
Jules Villard
f3411a2203
[HIL] Add `ExitScope` instruction
...
Summary:
It's useful for checkers to know when variables go out of scope to
perform garbage collection in their domains, especially for complex
domains with non-trivial joins. This makes the analyses more precise at
little cost.
This could have been added as a custom function call to a builtin, but I
decided against it because this instruction doesn't have the semantics
of any function call. It's better for each checker to explicitly not
deal with the custom instruction instead.
Reviewed By: jberdine
Differential Revision: D13102951
fbshipit-source-id: 33be22fab
6 years ago
Jules Villard
0b2dcbf406
[pulse] add non-passing tests about join
...
Summary: So we can see improvements in later diffs.
Reviewed By: skcho
Differential Revision: D13102949
fbshipit-source-id: 45494904b
6 years ago
Jules Villard
e3b4a135ae
[ai][pulse] fix minor html indentation issues
...
Summary: ross_pretty
Reviewed By: da319
Differential Revision: D13102950
fbshipit-source-id: 594213520
6 years ago
Jules Villard
55586b581b
[preanalysis] do not delay killing variables taken by reference
...
Summary:
Before, the liveness pre-analysis would place extra instructions in the
CFG for either:
1. marking an `Ident.t` as dead, or
2. marking a `Pvar.t` as `= 0`
But we have no way of marking pvars dead without setting them to 0. This
is bad because setting pvars to 0 is not possible everywhere they are
dead. Indeed, we only do it when we haven't seen their address being
taken anyway. This prevents the following situation, recorded in our tests:
```
int address_taken() {
int** x;
int* y;
int i = 7;
y = &i;
x = &y;
// if we don't reason about taken addresses while adding nullify instructions,
// we'll add
// `nullify(y)` here and report a false NPE on the next line
return **x;
}
```
So we want to mark pvars as dead without nullifying them. This diff
extends the `Remove_temps` SIL instruction to accept pvars as well, and
so renames it to `ExitScope`.
Reviewed By: da319
Differential Revision: D13102953
fbshipit-source-id: aa7f03a52
6 years ago
Nikos Gorogiannis
91f115fcaa
[biabduction] Don't raise on timeout without location
...
Reviewed By: jvillard
Differential Revision: D13213947
fbshipit-source-id: 61228e5b4
6 years ago
Sungkeun Cho
15b77ee8c8
[inferbo] Give semantics for unsigned int casting of minus one
...
Reviewed By: mbouaziz
Differential Revision: D13167389
fbshipit-source-id: 9ad2c8e23
6 years ago
Sungkeun Cho
5f925869b6
[infer] Translate more casts (unsigned int)
...
Reviewed By: mbouaziz
Differential Revision: D13167384
fbshipit-source-id: 666a52617
6 years ago
Mehdi Bouaziz
3b9bccf126
[html debug] Do not escape non-ascii chars
...
Reviewed By: skcho
Differential Revision: D13187822
fbshipit-source-id: 2b2e3d248
6 years ago
Sungkeun Cho
442fecc030
[inferbo] Fix performance of issue deduplication
...
Reviewed By: mbouaziz
Differential Revision: D13151692
fbshipit-source-id: 62bb0a932
6 years ago
Ted Reed
22bebd2cee
quandary: Break out deserialization from endpoints into a _risk category
...
Reviewed By: mbouaziz
Differential Revision: D13157416
fbshipit-source-id: 6ea34dd55
6 years ago
Mehdi Bouaziz
b0b96b453b
[cost] Do not need to load inferbo summary at calls
...
Reviewed By: skcho
Differential Revision: D13190966
fbshipit-source-id: 4e745dac3
6 years ago
Mehdi Bouaziz
52e2fb9f81
[inferbo] Rename is_collection_add -> last_included
...
Reviewed By: skcho
Differential Revision: D13190947
fbshipit-source-id: d435846e8
6 years ago
Mehdi Bouaziz
b92800a716
[inferbo] Do not join traces if Prune changed nothing
...
Reviewed By: skcho
Differential Revision: D13176164
fbshipit-source-id: 35341a99e
6 years ago
Mehdi Bouaziz
e091d229f8
[inferbo] Keep traces for iterators
...
Reviewed By: skcho
Differential Revision: D13176176
fbshipit-source-id: 3a42732c6
6 years ago
Ezgi Çiçek
305b2a74b8
[hoisting] Add new issue type for only invariant-modeled calls
...
Reviewed By: ngorogiannis
Differential Revision: D13194812
fbshipit-source-id: 0c020789d
6 years ago
Mehdi Bouaziz
8abe07ba20
[html debug] Cleanup unused CSS classes + use UTF-8
...
Reviewed By: jvillard
Differential Revision: D13187831
fbshipit-source-id: da99fdd45
6 years ago
Nikos Gorogiannis
6aba4b7ca2
[AI] kill astate type
...
Reviewed By: mbouaziz
Differential Revision: D10119192
fbshipit-source-id: 4868cbcb1
6 years ago
Mehdi Bouaziz
0ec75c587f
[inferbo] Minor simplifications
...
Reviewed By: ezgicicek
Differential Revision: D13190906
fbshipit-source-id: 0bb65fa30
6 years ago
Mehdi Bouaziz
e505fd2dba
[inferbo] Pointer comparison
...
Reviewed By: skcho
Differential Revision: D13066771
fbshipit-source-id: 134b27db8
6 years ago
Mehdi Bouaziz
8443cd73f6
[quandary] Allow sinks to have multiple taints
...
Reviewed By: jvillard
Differential Revision: D13163848
fbshipit-source-id: 929e4d0ea
6 years ago
Mehdi Bouaziz
8de2b93cab
[cost] Abstract type for polynomial degree
...
Reviewed By: ezgicicek
Differential Revision: D13175851
fbshipit-source-id: db9078037
6 years ago
Nikos Gorogiannis
bbd26769c9
[starvation] c++/Obj C deadlocks
...
Reviewed By: da319
Differential Revision: D9042172
fbshipit-source-id: a7052e061
6 years ago
Mehdi Bouaziz
5b3bca5562
[quandary] Allow sources to have multiple taints
...
Reviewed By: ngorogiannis
Differential Revision: D13163833
fbshipit-source-id: 89c27acea
6 years ago
Mehdi Bouaziz
8240ca4430
More unicode fun: bottom & top
...
Reviewed By: ngorogiannis
Differential Revision: D13175927
fbshipit-source-id: 7957deb84
6 years ago
Mehdi Bouaziz
5f60ffaa8f
[inferbo] Trace refactoring
...
Reviewed By: skcho
Differential Revision: D13116116
fbshipit-source-id: 0b885dcfb
6 years ago
Nikos Gorogiannis
2c6a705116
[racerd] kill stability
...
Reviewed By: jvillard
Differential Revision: D13180369
fbshipit-source-id: 5684ed318
6 years ago
Mehdi Bouaziz
f4e9975783
[inferbo] Fix deadcode
...
Reviewed By: skcho
Differential Revision: D13177132
fbshipit-source-id: 58c1fb538
6 years ago
Jules Villard
c00b076a05
[setup] opam 2
...
Summary:
Switches from opam 1 to opam 2.
Opam2 has some cool new features that simplify some of the scripting.
Notable changes:
1. Use the new `opam lock` *plugin* from https://github.com/AltGr/opam-lock/ instead of https://github.com/rgrinberg/opam-lock . This has a simpler interface for our purposes.
2. Change the way `./build-infer.sh` can be called to use an already existing switch: simply pass `--user-opam-switch` to the script and it won't attempt to create/set the current switch. This can be used to build infer in a local switch for instance.
3. Take advantage of automatic pinning where possible, eg to install infer deps without using opam.locked.
Reviewed By: ngorogiannis
Differential Revision: D13167863
fbshipit-source-id: 1a667c270
6 years ago
Mehdi Bouaziz
94e723bc82
[inferbo] Use Flat in relational domain
...
Reviewed By: skcho
Differential Revision: D13175923
fbshipit-source-id: e4bfa5ce6
6 years ago
Mehdi Bouaziz
8292323307
[inferbo/cost] Move Polynomials out of Itv.ml
...
Reviewed By: skcho
Differential Revision: D13173440
fbshipit-source-id: d1e699ee6
6 years ago
Mehdi Bouaziz
3cd57849c4
[inferbo] Remove duplicated module NonNegativeBound
...
Reviewed By: skcho
Differential Revision: D13173264
fbshipit-source-id: 4f2477889
6 years ago
Sungkeun Cho
8010b27cbd
[inferbo] Prepare delayed integer overflow reporting
...
Reviewed By: mbouaziz
Differential Revision: D13166479
fbshipit-source-id: 758f44512
6 years ago
Sungkeun Cho
edc090544a
[inferbo] Improve pp of Inferbo in traceview
...
Reviewed By: mbouaziz
Differential Revision: D13113991
fbshipit-source-id: 149652eff
6 years ago
Mehdi Bouaziz
1f96fd03cc
[inferbo] SymbolPath: rename Index -> Deref
...
Reviewed By: ezgicicek
Differential Revision: D13128441
fbshipit-source-id: f6547ed7c
6 years ago
Mehdi Bouaziz
a93e05e9fe
[inferbo] AliasRet: use AbstractDomain.Flat
...
Reviewed By: skcho
Differential Revision: D13164265
fbshipit-source-id: 66aad24fa
6 years ago
Mehdi Bouaziz
3a5d995369
[inferbo] AliasMap: use AbstractDomain.Map
...
Reviewed By: skcho
Differential Revision: D13164209
fbshipit-source-id: 2a1339d89
6 years ago
Nikos Gorogiannis
1121efbe59
[concurrency] refactor C++ models
...
Reviewed By: jberdine
Differential Revision: D13153721
fbshipit-source-id: 316f1922d
6 years ago
Daiva Naudziuniene
b640d69021
[pulse] An example of false positive caused by an allocation in a branch
...
Summary: The title
Reviewed By: mbouaziz
Differential Revision: D13167332
fbshipit-source-id: dd6588904
6 years ago
Mehdi Bouaziz
d6423cf598
[inferbo] Preparing for trace rewrite
...
Reviewed By: skcho
Differential Revision: D13116106
fbshipit-source-id: 36cdad380
6 years ago
Mehdi Bouaziz
828fa236d4
[Inferbo] represents_multiple_values from path
...
Summary:
It removes the `represents_multiple_values` parameters when we can know them from `path` values.
Depends on D12939124
Reviewed By: skcho
Differential Revision: D12939130
fbshipit-source-id: 30ff768b2
6 years ago
Dino Distefano
9028b91ec7
Load data from performance profiler
...
Reviewed By: martinoluca
Differential Revision: D9593836
fbshipit-source-id: 923bfc1f3
6 years ago
Martino Luca
664978d654
Revert D12819709 to patch OOM events
...
Reviewed By: mbouaziz, ddino
Differential Revision: D13138398
fbshipit-source-id: c9a028c37
6 years ago
Ezgi Çiçek
613c4a2848
[purity] Fix wrong invalidation of all params
...
Reviewed By: ddino
Differential Revision: D13119156
fbshipit-source-id: a766c16be
6 years ago
Sungkeun Cho
b4683d965d
[inferbo] Resize array on casting
...
Summary:
It modifies sizes and offsets of array values on pointer castings.
Currently, it supports only simple castings of pointer-to-integers.
Reviewed By: mbouaziz
Differential Revision: D12920589
fbshipit-source-id: a5ba831b8
6 years ago
Sungkeun Cho
c8a17b9d0e
[inferbo] Pass integer type widths to eval for cast
...
Summary: In this diff, it passes the parameter of integer type widths to evaluation functions. The parameter which will be used for casting in the following diff.
Reviewed By: mbouaziz
Differential Revision: D12920581
fbshipit-source-id: 48bbc802b
6 years ago
Sungkeun Cho
1486a5f105
[infer] Translate casting expressions of integer pointers
...
Summary:
It enables the translation of casting expression. As of now, it
translates only the castings of pointers to integer types, in order to
avoid too much of change, which may mess the checkers up.
Reviewed By: jvillard
Differential Revision: D12920568
fbshipit-source-id: a5489df24
6 years ago
Dino Distefano
0d5a7028ab
Removing unnecessary printing
...
Reviewed By: jvillard
Differential Revision: D13137385
fbshipit-source-id: 92c6d379c
6 years ago
Nikos Gorogiannis
3b5262f185
[racerd] refactor method matching for all languages
...
Reviewed By: jeremydubreil
Differential Revision: D12907796
fbshipit-source-id: 764d2eef4
6 years ago
Jules Villard
646aa30797
[cfg] print dotty *after* pre-analysis
...
Summary:
Useful to understand the changes in the pre-analysis, or to inspect the
CFG that checkers actually get.
This means that the pre-analysis always runs when we output the dotty,
but I don't really see a reason why not. In fact, we could probably
*always* store the CFGs as pre-analysed.
Reviewed By: mbouaziz
Differential Revision: D13102952
fbshipit-source-id: 89f3102ec
6 years ago
Mehdi Bouaziz
4a4e8c6e1b
concat_traces: always print labels
...
Reviewed By: jvillard
Differential Revision: D13118979
fbshipit-source-id: 0875b7777
6 years ago
Mehdi Bouaziz
acf740e145
Print Unicode chars only if the locale allows it
...
Reviewed By: jvillard
Differential Revision: D13118955
fbshipit-source-id: 0d817f45f
6 years ago
Ezgi Çiçek
5fa89e2563
[purity] Disable clang
...
Reviewed By: jvillard
Differential Revision: D13118428
fbshipit-source-id: f4e86f286
6 years ago
Martino Luca
77a5fbd7ba
[Perf] Emit reports as Advice
...
Reviewed By: ddino
Differential Revision: D13118620
fbshipit-source-id: 9e2e9ce81
6 years ago
Martino Luca
b61d21cbff
[Perf] Better message for PERF VARIATION type
...
Reviewed By: ddino
Differential Revision: D13118585
fbshipit-source-id: 219b16236
6 years ago
Mehdi Bouaziz
ed25b70ff2
RacerD: use concat_traces
...
Reviewed By: jvillard
Differential Revision: D13114226
fbshipit-source-id: 820837fb2
6 years ago
Mehdi Bouaziz
efcfea5454
First step for multiple traces
...
Reviewed By: jvillard
Differential Revision: D13114225
fbshipit-source-id: face828c6
6 years ago
Mehdi Bouaziz
8d990d6470
[inferbo] Move Boolean to their own module
...
Reviewed By: skcho
Differential Revision: D13111801
fbshipit-source-id: 6eca0e1c9
6 years ago
Mehdi Bouaziz
8fcbfcb741
[inferbo] Pretty-print more abstract locations
...
Reviewed By: ezgicicek
Differential Revision: D13114228
fbshipit-source-id: 9f4b16817
6 years ago
Sungkeun Cho
aa3fa55f05
[inferbo] Fix check of access condition
...
Reviewed By: mbouaziz
Differential Revision: D13114160
fbshipit-source-id: 9e46cf814
6 years ago
Sungkeun Cho
e912bf2aa5
[inferbo] Prune more for "(x + e1) < e2" cases
...
Reviewed By: mbouaziz
Differential Revision: D13095472
fbshipit-source-id: 21aef560a
6 years ago
Sungkeun Cho
e190325b82
[inferbo] Distinguish collection add against array access in pp
...
Reviewed By: mbouaziz
Differential Revision: D13096380
fbshipit-source-id: d8878749f
6 years ago
Sungkeun Cho
0d2b0e1ab7
[inferbo] Fix check function for is_collection_add
...
Summary: It fixes the conditions of the `check` function to address `is_collection_add` cases correctly.
Reviewed By: mbouaziz
Differential Revision: D13081281
fbshipit-source-id: 39ae5ef03
6 years ago
Mehdi Bouaziz
bc1e048fe3
[compilation database] Disable C++ modules
...
Reviewed By: da319
Differential Revision: D13102792
fbshipit-source-id: 96fce32c6
6 years ago
Martino Luca
6d12d67613
[Perf] Embed filtering for costs reports
...
Reviewed By: mbouaziz
Differential Revision: D13103020
fbshipit-source-id: 641e549ee
6 years ago
Mehdi Bouaziz
29631b7358
[Inferbo] Differentiate array and pointer in SymbolPaths
...
Reviewed By: jvillard
Differential Revision: D12939124
fbshipit-source-id: 256d0b159
6 years ago
Mehdi Bouaziz
4671bab088
[inferbo] Preparing for one-value symbols
...
Reviewed By: skcho
Differential Revision: D13071832
fbshipit-source-id: d978eead0
6 years ago
Mehdi Bouaziz
7c00591747
[inferbo] Type name for eval_sym
...
Reviewed By: skcho
Differential Revision: D13071774
fbshipit-source-id: 1dc412646
6 years ago
Nikos Gorogiannis
68a08a8a09
[starvation] stop reporting on AccountManager.setUserData
...
Reviewed By: da319
Differential Revision: D13097076
fbshipit-source-id: 748acbe2b
6 years ago
Mehdi Bouaziz
fac9932168
[inferbo] Add traces to Conditions always true/false and Unreachable code
...
Reviewed By: ezgicicek
Differential Revision: D13082665
fbshipit-source-id: bb0e4cbf3
6 years ago
Ezgi Çiçek
6683c71f8b
[purity, hoisting] Add more purity models for fblite and instagram
...
Reviewed By: mbouaziz
Differential Revision: D13082201
fbshipit-source-id: e2b3f3e18
6 years ago
Nikos Gorogiannis
ab046a4128
memcached intra-build
...
Summary: Experimental feature: Use memcached for summaries as a look-aside cache during analysis.
Reviewed By: jvillard
Differential Revision: D12939311
fbshipit-source-id: 9f78994e2
6 years ago
Sungkeun Cho
1503f63c27
[inferbo] Fix evaluation of multi-dimensional arrays
...
Reviewed By: mbouaziz
Differential Revision: D13082043
fbshipit-source-id: 5a45b4eee
6 years ago
Sungkeun Cho
07f8855185
[inferbo] Fix condition check of multi-dimensional array
...
Reviewed By: mbouaziz
Differential Revision: D13082491
fbshipit-source-id: 43775a1a1
6 years ago
Nikos Gorogiannis
f3194e00c9
[starvation] silence some strict mode models
...
Reviewed By: mbouaziz
Differential Revision: D13082383
fbshipit-source-id: 7f16b94c5
6 years ago
Nikos Gorogiannis
d53c81c65c
[concurrency] add model for android.app.Application
...
Reviewed By: mbouaziz
Differential Revision: D13083046
fbshipit-source-id: 99c459f70
6 years ago
Nikos Gorogiannis
276c25b563
[starvation] no starvation warnings on constructors
...
Reviewed By: mbouaziz
Differential Revision: D13082676
fbshipit-source-id: 0942149ae
6 years ago
Martino Luca
28e7063ac4
[Perf] Do not fail when encountering non-ASCII chars in JSON payloads
...
Reviewed By: mbouaziz
Differential Revision: D13084118
fbshipit-source-id: 4df1d9ee8
6 years ago
Dino Distefano
c4701f8a04
Fix ERROR RUNNING BACKEND
...
Reviewed By: mbouaziz
Differential Revision: D13082108
fbshipit-source-id: 1c21b9e9f
6 years ago
Mehdi Bouaziz
716caf91bf
Add is_singleton_or_more to Set and Map
...
Reviewed By: skcho
Differential Revision: D13062696
fbshipit-source-id: 3a7286f55
6 years ago
Nikos Gorogiannis
a3df8f9f99
[starvation] simplify report format
...
Reviewed By: mbouaziz
Differential Revision: D13065391
fbshipit-source-id: 6e302cf85
6 years ago
Nikos Gorogiannis
b5094cda9b
[starvation] suppress the number of reports suppressed
...
Summary:
Currently, if there are several reports on the same line, the most important one is reported together with a message containing how many reports were suppressed.
This is sometimes causing the bug hash we use believe that a report is introduced (eg if the number of suppressed reports changes).
Reviewed By: mbouaziz
Differential Revision: D13067306
fbshipit-source-id: 1cc0c6d3a
6 years ago
Dino Distefano
c8c895dbc0
Fix buck
...
Reviewed By: martinoluca, jvillard
Differential Revision: D13064796
fbshipit-source-id: 4483025f8
6 years ago
Martino Luca
71d5b2f8ff
[Infer][Perf] Enrich messages with Markup syntax
...
Summary:
Messages emitted by cost-analysis now look like the following:
Complexity of this function has **increased** from `O(1)` to `O(n)`.
Reviewed By: mbouaziz
Differential Revision: D13058008
fbshipit-source-id: 119037703
6 years ago
Jules Villard
b42d625606
[tests] fix buck tests
...
Reviewed By: mbouaziz, ddino
Differential Revision: D13058256
fbshipit-source-id: d18b5a70d
6 years ago
Mehdi Bouaziz
0ba4c2c892
[cost] Pretty-printing exponents
...
Reviewed By: ezgicicek
Differential Revision: D13050241
fbshipit-source-id: dbac027b7
6 years ago
Mehdi Bouaziz
5ed59b1655
[Inferbo/cost] Improve pretty-printing
...
Reviewed By: skcho
Differential Revision: D13045247
fbshipit-source-id: 5485b58c8
6 years ago
Ezgi Çiçek
dde0067eec
[purity] Don't report pure functions if hoisting mode is turned-on
...
Reviewed By: ddino
Differential Revision: D13025725
fbshipit-source-id: 44d138418
6 years ago
Ezgi Çiçek
f3d82a0230
[hoisting] Don't report functions modeled as VariantForHoisting but consider them invariant
...
Reviewed By: ddino
Differential Revision: D13025250
fbshipit-source-id: ba1e39591
6 years ago
Sungkeun Cho
50ebea5faa
[inferbo] Fix path of allocsite in declaration
...
Reviewed By: mbouaziz
Differential Revision: D13057595
fbshipit-source-id: 04bda78c0
6 years ago
Mehdi Bouaziz
42b16d45fa
[inferbo] New tests
...
Reviewed By: skcho
Differential Revision: D13048352
fbshipit-source-id: f0a2dc7a4
6 years ago
Mehdi Bouaziz
2a60a988e7
[buck] Update parameters with arguments list
...
Reviewed By: martinoluca
Differential Revision: D12952032
fbshipit-source-id: 27f72423a
6 years ago
Martino Luca
0547878898
Update InferBO tests
...
Reviewed By: mbouaziz
Differential Revision: D13045905
fbshipit-source-id: d747623fd
6 years ago
Mehdi Bouaziz
a7921536da
[quandaryBO] New test
...
Reviewed By: skcho
Differential Revision: D13000192
fbshipit-source-id: ba1e3eb37
6 years ago
Martino Luca
32f448a6f0
[Infer][Perf] Emit messages using the asymptotic Bachmann–Landau notation, aka Big O notation
...
Reviewed By: mbouaziz
Differential Revision: D13042865
fbshipit-source-id: bf8e40e58
6 years ago
Martino Luca
ce5d3e469f
[Infer][Perf] pp symbols without bound-end information when not in developer-mode
...
Reviewed By: mbouaziz
Differential Revision: D13042834
fbshipit-source-id: 602c716df
6 years ago