Dulma Churchill
c06795e631
Fixing the treatment of annotations in the clang frontend
...
Reviewed By: jvillard
Differential Revision: D3488426
fbshipit-source-id: fe3cb1b
9 years ago
Andrzej Kotulski
c7d6d904f7
Whitelist std::min and std::max
...
Summary: Those functions have simple enough implementations for infer to understand them
Reviewed By: jvillard
Differential Revision: D3463084
fbshipit-source-id: f84160f
9 years ago
Dulma Churchill
edc57f70f5
Translate CXXNoexceptExpr
...
Reviewed By: akotulski
Differential Revision: D3481942
fbshipit-source-id: ff4df1a
9 years ago
Dulma Churchill
8bfa983716
Translate TypeTraitExpr
...
Reviewed By: akotulski
Differential Revision: D3476378
fbshipit-source-id: 721f535
9 years ago
Lázaro Clapp Jiménez Labora
95a12d9706
model String.equals(...) as '=='
...
Reviewed By: sblackshear
Differential Revision: D3468427
fbshipit-source-id: 852ef5f
9 years ago
Dulma Churchill
52e037f77c
Translate AttributedStmt and Fallthrough attribute
...
Reviewed By: akotulski
Differential Revision: D3469616
fbshipit-source-id: fe18937
9 years ago
Peter O'Hearn
1edb492b70
One step closer to shipping initial GUARDEDBY
...
Reviewed By: jvillard
Differential Revision: D3469320
fbshipit-source-id: b8491a7
9 years ago
Andrzej Kotulski
3603fc3176
Modify cast_with_enforce.cpp test to not include <string>
...
Reviewed By: dulmarod
Differential Revision: D3469110
fbshipit-source-id: 1d848fb
9 years ago
Sam Blackshear
9d95a3a199
don't warn if procedure is marked VisibleForTesting
...
Reviewed By: jvillard
Differential Revision: D3467885
fbshipit-source-id: 80f5f6b
9 years ago
Sam Blackshear
03df3a0c47
supporting guarding on outer-class this in inner class
...
Reviewed By: peterogithub
Differential Revision: D3466342
fbshipit-source-id: ba4f86f
9 years ago
Sam Blackshear
7ae14d0bdf
don't report on compiler-generated access$ methods
...
Reviewed By: peterogithub
Differential Revision: D3460177
fbshipit-source-id: 3a1a782
9 years ago
Sam Blackshear
df257da918
supporting @GuardedBy(MyClass.class) idiom
...
Reviewed By: peterogithub
Differential Revision: D3459531
fbshipit-source-id: 6e47c51
9 years ago
Sam Blackshear
6304e30f5a
don't warn on read-write locks
...
Reviewed By: peterogithub
Differential Revision: D3443015
fbshipit-source-id: e843d13
9 years ago
Sam Blackshear
b940c4dfac
warning on guarded-by writes
...
Differential Revision: D3390055
fbshipit-source-id: 1c68fcd
9 years ago
Dulma Churchill
b1e3d994bd
Report more cases of null dereference as empty vector access
...
Differential Revision: D3429002
fbshipit-source-id: e87960f
9 years ago
Andrzej Kotulski
a825831625
Model vector::resize(n) as nonempty vector
...
Summary:
Assume that std::vector::resize will always create nonempty vector. While this is clearly
wrong for resize(0), it removes many FPs for `resize(n)` calls, where value of `n` is unknown.
Without it, infer was thinking that `n` could be 0 and reported empty vector access.
Reviewed By: jvillard
Differential Revision: D3424355
fbshipit-source-id: cb476de
9 years ago
Peter O'Hearn
508d6a3ae7
optional model
...
Reviewed By: jvillard
Differential Revision: D3400635
fbshipit-source-id: 2078050
9 years ago
Dulma Churchill
5adab3cb61
Fix StmtExpr
...
Summary:
The extra dereference in stmtexpr was wrong. When a dereference is needed, we have a cast.
This was causing one dereference too many, and creating wrong results.
Reviewed By: akotulski
Differential Revision: D3393294
fbshipit-source-id: 7a1ec8e
9 years ago
Peter O'Hearn
8613f16c19
drop GuardedBy ui_thread warnings
...
Reviewed By: jvillard
Differential Revision: D3392589
fbshipit-source-id: 51a73c9
9 years ago
Dulma Churchill
a68c45c2a9
Fix dyspatch_async calls
...
Reviewed By: akotulski
Differential Revision: D3392473
fbshipit-source-id: 37b5b67
9 years ago
Jeremy Dubreil
17da853fa8
Do not angelically remove the file attribute on the reciever for virtual calls
...
Reviewed By: peterogithub
Differential Revision: D3377851
fbshipit-source-id: 22c2ea1
9 years ago
Dulma Churchill
5ed970efa9
Fix the return stmt that would not be the last instruction in the path in some cases
...
Reviewed By: akotulski
Differential Revision: D3372050
fbshipit-source-id: 959bff5
9 years ago
Sam Blackshear
fd8a864c15
doing preanalysis on-demand
...
Reviewed By: jeremydubreil
Differential Revision: D3352767
fbshipit-source-id: a9dcc0a
9 years ago
Dulma Churchill
60d9a19ae0
Fix bucketing for variables passed by reference
...
Reviewed By: akotulski
Differential Revision: D3358473
fbshipit-source-id: ed7a509
9 years ago
Andrzej Kotulski
0f895b0684
Improve empty vector tests
...
Summary:
Now all code in tests is reachable by the analyzer which increases
test quality.
Reviewed By: dulmarod
Differential Revision: D3358591
fbshipit-source-id: d54877e
9 years ago
Dulma Churchill
bf9d194e43
Translate builtin_expect as its first argument. Avoids weird symb. exec. problems
...
Reviewed By: akotulski
Differential Revision: D3348097
fbshipit-source-id: 8f19072
9 years ago
Andrzej Kotulski
617ffab0ac
Add @generated comment to icfg.dot files
...
Reviewed By: jvillard
Differential Revision: D3358243
fbshipit-source-id: a47cc01
9 years ago
Sam Blackshear
7ec8f59998
adding find_in_node_or_preds to clean up errdesc
...
Reviewed By: cristianoc
Differential Revision: D3346710
fbshipit-source-id: ba729e0
9 years ago
Dino Distefano
daf043bff1
Fixing shortcircuit in binary operator.
...
Reviewed By: dulmarod
Differential Revision: D3340811
fbshipit-source-id: 70fbbcf
9 years ago
Andrzej Kotulski
3699b9c0dc
Fix translation of passing struct parameters by value
...
Summary:
Pass object by reference every time struct object is passed by value
in C++. Do it only for C++/objC++ where we have guarantee that the
object which is passed will be temporary one (created by copy constructor).
Reviewed By: jberdine
Differential Revision: D3346271
fbshipit-source-id: d3e5daa
9 years ago
Dulma Churchill
de615594df
Skip whitelisted functions form trace
...
Reviewed By: akotulski
Differential Revision: D3335216
fbshipit-source-id: 3bda232
9 years ago
Cristiano Calcagno
56cfac14da
Fix issue in join where the origin of a variable would be lost in a loop.
...
Reviewed By: sblackshear
Differential Revision: D3340039
fbshipit-source-id: 2e00d3d
9 years ago
Sam Blackshear
e3e80dd2f0
don't report on private unguarded accesses
...
Reviewed By: jvillard
Differential Revision: D3334391
fbshipit-source-id: a5079b5
9 years ago
Sam Blackshear
36ee3730aa
reporting error on unprotected access to field annotated with @GuardedBy
...
Reviewed By: peterogithub
Differential Revision: D3318994
fbshipit-source-id: e36b927
9 years ago
Andrzej Kotulski
8ccdff649f
Report empty vector access instead of null dereference
...
Summary:
Make analyzer find out when null dereference comes from std::vector method.
If it does, it means that it's really empty vector access (due to the
way infer models std::vector)
Reviewed By: sblackshear
Differential Revision: D3327933
fbshipit-source-id: b9e11d6
9 years ago
Andrzej Kotulski
058f4455dc
Modify model of std::vector
...
Summary:
Turns out, analyzer was getting confused with complicated
model and it was reporting empty access in places it
shouldn't. Fixing backend is not trivial (tracing mode is the answer),
but the model can be simplified.
It introduces the problem that get() method doesn't return fresh value
every time, but we should be able to change backend later to deal with it.
Reviewed By: sblackshear
Differential Revision: D3328228
fbshipit-source-id: dddbaf8
9 years ago
Jules Villard
e695e14ee1
add various filter options from inferconfig to the CLI
...
Summary:
Part of the migration of .inferconfig-specific options into options accepted
both by .inferconfig and the CLI.
Reviewed By: jberdine
Differential Revision: D3304783
fbshipit-source-id: 4a7ee6f
9 years ago
Dino Distefano
aae1dbac3d
Skipping reporting global variable warning on known non-expensive cases.
...
Reviewed By: dulmarod
Differential Revision: D3298191
fbshipit-source-id: 8b3a38b
9 years ago
Dino Distefano
f37ed66888
Added new taint source/sink for iOS
...
Reviewed By: sblackshear
Differential Revision: D3054009
fbshipit-source-id: 6f6a20a
9 years ago
Sam Blackshear
83f511107b
stop reporting handler leaks
...
Reviewed By: jeremydubreil
Differential Revision: D3295094
fbshipit-source-id: 038d933
9 years ago
Andrzej Kotulski
bfce6bac47
Model empty vector access
...
Summary:
Create model of C++ std::vector to find occurrences when vector which might be empty is accessed. Do it by triggering null dereference every time empty vector access is performed.
Note: model will be used only when c++11 (or c++14) are used.
Reviewed By: sblackshear
Differential Revision: D3276203
fbshipit-source-id: 420a95a
9 years ago
Dulma Churchill
6c7c18e920
Model other functions from glog library
...
Reviewed By: akotulski
Differential Revision: D3293184
fbshipit-source-id: 033f435
9 years ago
Dulma Churchill
9b1bd712b5
Marking getters/setters as builtins only inside the definition of the class
...
Reviewed By: ddino
Differential Revision: D3292534
fbshipit-source-id: 23fc4ec
9 years ago
Sam Blackshear
258e765d4e
adding integrity source/sink annotations
...
Reviewed By: jeremydubreil
Differential Revision: D3285673
fbshipit-source-id: 666421c
9 years ago
Sam Blackshear
3f49f3a1d4
using liveness to add removetemps instructions
...
Reviewed By: jberdine
Differential Revision: D3245574
fbshipit-source-id: 02c1bcd
9 years ago
Sam Blackshear
20925df57c
removing unused deallocate param in nullify instr
...
Reviewed By: jeremydubreil
Differential Revision: D3263241
fbshipit-source-id: b0d2c0f
9 years ago
Sam Blackshear
4fd2f52fe8
new analysis for adding nullify's
...
Reviewed By: jeremydubreil
Differential Revision: D3241019
fbshipit-source-id: 8409b33
9 years ago
Dulma Churchill
c3fbd5af29
Model CHECK macro and fix the model for builtin_expect
...
Reviewed By: akotulski
Differential Revision: D3264368
fb-gh-sync-id: 1f79e19
fbshipit-source-id: 1f79e19
9 years ago
Dulma Churchill
3defb52e4e
Fixing broken test + adding objcpp tests to make test target
...
Reviewed By: jvillard
Differential Revision: D3270395
fb-gh-sync-id: 8972e8e
fbshipit-source-id: 8972e8e
9 years ago
Sam Blackshear
6f6da12b2c
don't nullify params/locals at beginning of procedure
...
Reviewed By: jeremydubreil
Differential Revision: D3258615
fb-gh-sync-id: 73e4670
fbshipit-source-id: 73e4670
9 years ago