Geoffrey White
492c5f367f
C++: Simplify NewDelete.qll.
2020-04-06 14:54:15 +01:00
Geoffrey White
cbe133d0e6
C++: Deprecate freeCall in the legacy wrapper Alloc.qll.
2020-04-06 14:32:49 +01:00
Geoffrey White
e223557201
C++: Wean NewDelete.qll off the legacy wrapper Alloc.qll.
2020-04-06 14:32:15 +01:00
Geoffrey White
8059d69bbd
C++: Model calls to operator new / delete for NewFreeMismatch.ql.
2020-04-06 14:27:05 +01:00
Geoffrey White
3e9f9645ae
C++: Exclude calls to operator new / delete from NewFreeMismatch.ql.
2020-04-06 14:08:00 +01:00
Geoffrey White
b2c5ce8dbd
C++: Exclude code in templates.
2020-03-11 18:11:45 +00:00
Jonas Jensen
c4d2163321
Merge pull request #2673 from aschackmull/ql/autoformat-comparisonterm
...
Java/C++/C#: Autoformat comparison terms
2020-01-30 08:47:50 +01:00
Anders Schack-Mulligen
96e4a57edd
C++: Autoformat.
2020-01-29 13:11:50 +01:00
Marc Waldman
dbe51e070f
Merge pull request #2 from marcrepo/patch-2
...
Documentation update for Issue #2623
2020-01-17 04:55:34 -05:00
Marc Waldman
0d409b2d69
Documentation update for Issue #2623
...
Changes based on Issue #2623 - DescriptorNeverClosed.ql identifies only sockets (not file handles)
2020-01-17 04:46:10 -05:00
Marc Waldman
140051cc9a
Removed word "file" from description (see Issue 2623)
...
This pull request is in reference to Issue #2623 - "DescriptorNeverClosed.ql identifies only sockets (not file handles)"
2020-01-17 04:38:15 -05:00
Geoffrey White
ab0be19cc5
C++: Autoformat.
2019-12-17 17:51:55 +00:00
Geoffrey White
9986206dc6
C++: Placement new does not necessarily require a delete.
2019-12-17 15:28:21 +00:00
Geoffrey White
520ff39349
C++: Update MemoryMayNotBeFreed.ql similarly.
2019-12-17 11:56:23 +00:00
Geoffrey White
9a944a947a
C++: Update MemoryNeverFreed.ql to exclude alloca (and use the new allocation model directly).
2019-12-17 11:10:03 +00:00
Geoffrey White
0da826f0c3
Merge branch 'master' into overflowcalc
2019-12-16 13:48:38 +00:00
Geoffrey White
6fc415485b
CPP: Autoformat.
2019-11-22 15:34:51 +00:00
Geoffrey White
3c9432d7b7
CPP: Queries: Improve OverflowCalculated query.
2019-11-22 15:19:00 +00:00
Geoffrey White
1e7bd9e987
CPP: Queries: Similar dataflow simplification in OverflowCalculated.ql to that made recently in NoSpaceForZeroTerminator.ql.
2019-11-22 15:19:00 +00:00
Jonas Jensen
140575ee71
C++: Use StackVariable where SSA/def-use are used
...
These changes should not affect semantics since these uses of
`LocalScopeVariable` were already constrained to stack variables by
their use of SSA or def-use.
2019-11-19 11:31:34 +01:00
Jonas Jensen
29f66ff095
C++: Use StackVariable, remove not v.isStatic()
...
In these files it was possible to remove calls to `isStatic` by
switching from `LocalScopeVariable` to `StackVariable`. This changes
semantics, hopefully for the better, to treat `thread_local` locals the
same as `static` locals.
2019-11-19 11:30:59 +01:00
Jonas Jensen
c1ed908834
C++: Use StackVariableReachability
...
This library is a drop-in replacement for
`LocalScopeVariableReachability`, so no changes are expected.
2019-11-19 11:30:59 +01:00
Robert Marsh
9554513cd6
autoformat
2019-11-12 10:16:01 -08:00
Robert Marsh
4018ed67a6
C++: respond to PR comments
2019-10-02 11:38:20 -07:00
Robert Marsh
03f72d207c
C++: use Declaration.hasGlobalOrStdName
2019-10-02 11:37:37 -07:00
Jonas Jensen
4ef5c9af62
C++: Autoformat everything
...
Some files that will change in #1736 have been spared.
./build -j4 target/jars/qlformat
find ql/cpp/ql -name "*.ql" -print0 | xargs -0 target/jars/qlformat --input
find ql/cpp/ql -name "*.qll" -print0 | xargs -0 target/jars/qlformat --input
(cd ql && git checkout 'cpp/ql/src/semmle/code/cpp/ir/implementation/**/*SSA*.qll')
buildutils-internal/scripts/pr-checks/sync-identical-files.py --latest
2019-09-09 11:25:53 +02:00
Jonas Jensen
95f53639b1
C++: Fixes to avoid confusing autoformat
...
These issues were found by Geoffrey in PR review.
2019-09-09 11:04:04 +02:00
Jonas Jensen
f1d7fde49d
C++: Use localExprFlow in existing queries
...
This shortens the queries a bit and ensures test coverage of the new
predicate.
2019-09-02 09:29:12 +02:00
Jonas Jensen
5e789901df
C++: Remove all uses of hasQualifiedName/1
2019-05-03 10:37:48 +02:00
Jonas Jensen
64a87a863c
C++: Remove uses of getQualifiedName
...
This removes all uses of `Declaration.getQualifiedName` that I think can
be removed without changing any behaviour. The following uses in the
LGTM default suite remain:
* `cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql` (in `select`).
* `cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll` (needs template args).
* `cpp/ql/src/semmle/code/cpp/security/FunctionWithWrappers.qll` (used for alert messages).
2019-05-03 10:37:48 +02:00
Geoffrey White
a5b9df204b
CPP: Autoformat.
2019-05-01 13:59:28 +01:00
Jonas Jensen
9d15e67f3c
C++: Use variableAccessedAsValue in LargeParameter
...
Using `variableAccessedAsValue` fixes a FP because we can now
distinguish modifications to the parameter from modifications to data
_reachable from_ the parameter.
2019-05-01 13:58:55 +01:00
Geoffrey White
2ef3cc30c0
CPP: Fix for functions with no definition.
2019-05-01 13:17:11 +01:00
Geoffrey White
32b6e9bd3c
CPP: Exclude cases where the parameter is written to.
2019-05-01 13:17:10 +01:00
Geoffrey White
88a0e60a2a
CPP: Un-autoformat to ease merge.
2019-05-01 13:16:46 +01:00
Geoffrey White
09ce95575a
CPP: Fix merge.
2019-05-01 09:08:44 +01:00
Geoffrey White
6234b26496
CPP: Make some repairs manually.
2019-04-23 14:45:27 +01:00
Geoffrey White
e395f5215f
CPP: Autoformat 'Critical'.
2019-04-23 14:45:27 +01:00
Geoffrey White
57a4e52b47
CPP: Remove the overlap between these two queries.
2019-04-18 10:33:33 +01:00
Geoffrey White
ca6ba36d87
CPP: Unify and improve the MallocCall classes.
2019-04-18 10:30:18 +01:00
Geoffrey White
8979361255
CPP: Exclude functions containing preprocessor logic.
2019-04-02 14:24:37 +01:00
Geoffrey White
faeb326bf8
CPP: Use newer dataflow for the fix.
2019-03-20 15:47:48 +00:00
Geoffrey White
7d8886e30c
CPP: Fix over-enthusiastic dataflow in allocExprOrIndirect.
2019-03-20 15:40:02 +00:00
Geoffrey White
249f350cc8
Fix NewDelete.qll performance.
2019-03-12 11:32:24 +00:00
Geoffrey White
56fe91d774
CPP: cached -> pragma[nomagic].
2019-03-05 08:59:16 +00:00
Geoffrey White
a9ce2f7a62
CPP: Simplify out some old optimizations (that make little difference now).
2019-03-04 13:13:04 +00:00
Geoffrey White
df73bb3468
CPP: Fix performance issue. Also has a small positive effect on correctness.
2019-03-04 12:47:55 +00:00
Jonas Jensen
1bc967c1d1
Merge pull request #819 from geoffw0/newdelete
...
CPP: Improve dataflow in newdelete.qll
2019-02-21 15:09:49 +01:00
Geoffrey White
cd13e5877f
CPP: Performance improvement.
2019-02-21 11:31:44 +00:00
Geoffrey White
d30bcb6fcf
CPP: Widen allocReachedVariable slightly.
2019-02-20 10:19:57 +00:00