Geoffrey White
17ff34267a
C++: Resolve the overlap.
2020-10-20 17:47:49 +01:00
Geoffrey White
4630c69950
C++: Add a test case resembling the example from ODASA-3940.
2020-10-20 17:39:32 +01:00
Geoffrey White
857a4d8a3f
C++: Merge the two tests, so that overlaps are obvious.
2020-10-20 17:33:15 +01:00
Geoffrey White
a372578571
C++: Move the SizeCheck*.ql tests to the standard location.
2020-10-20 16:02:54 +01:00
Geoffrey White
edc5d5d128
C++: Add a test of MissingNullTest.
2020-06-25 11:04:06 +01:00
Cornelius Riemenschneider
a50d5b7c6a
Accept changed test output.
2020-04-27 09:17:16 +02: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
97cdcbee63
C++: Test for NewFreeMismatch.ql with operator new / delete.
2020-04-06 13:57:28 +01:00
Geoffrey White
b2c5ce8dbd
C++: Exclude code in templates.
2020-03-11 18:11:45 +00:00
Geoffrey White
d454c8457d
C++: Test case.
2020-03-11 18:09:09 +00:00
Geoffrey White
3aa66f5aca
C++: Merge the OverflowStatic tests.
2020-01-23 11:05:46 +00:00
Geoffrey White
3c9432d7b7
CPP: Queries: Improve OverflowCalculated query.
2019-11-22 15:19:00 +00: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
60494fd6d5
CPP: Subtle test case.
2019-05-01 13:17:11 +01:00
Geoffrey White
2ef3cc30c0
CPP: Fix for functions with no definition.
2019-05-01 13:17:11 +01:00
Geoffrey White
6f2274aa5e
CPP: Another test case.
2019-05-01 13:17:10 +01:00
Geoffrey White
32b6e9bd3c
CPP: Exclude cases where the parameter is written to.
2019-05-01 13:17:10 +01:00
Geoffrey White
54c766c622
CPP: Add more test cases for LargeParameter.ql.
2019-05-01 13:17:10 +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
1ba8364c3b
CPP: Add more test cases.
2019-04-18 10:28:34 +01:00
Geoffrey White
8856442f7f
CPP: Add NoSpaceForZeroTerminator to the OverflowCalculated test.
2019-04-18 09:19:44 +01:00
Geoffrey White
8979361255
CPP: Exclude functions containing preprocessor logic.
2019-04-02 14:24:37 +01:00
Geoffrey White
5cb30b04cc
CPP: Add a test case.
2019-04-02 13:15:40 +01:00
Geoffrey White
867f357b36
CPP: Correct the test.
2019-03-21 10:57:44 +00: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
ea7e8927fe
CPP: Add a test similar to the false positive in arvidn/libtorrent.
2019-03-20 15:35:58 +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
Geoffrey White
f0085ed25a
CPP: Additional test cases.
2019-03-04 12:45:05 +00:00
Geoffrey White
d30bcb6fcf
CPP: Widen allocReachedVariable slightly.
2019-02-20 10:19:57 +00:00
Geoffrey White
23ae12a763
CPP: Add test cases.
2019-02-20 10:19:57 +00:00
Jonas Jensen
45a995ba52
C++: Accept test changes from last commit
2019-02-04 13:00:28 +01:00
Jonas Jensen
1cc36dd969
C++: Exclude copy assignment in LargeParameter.ql
...
The purpose of the copy assignment operator is to copy the object, so we
should not complain that a copy happens when passing the parameter. See
https://en.wikibooks.org/wiki/More_C++_Idioms/Copy-and-swap for details.
2019-01-11 12:00:02 +01:00
Jonas Jensen
4ea3849595
C++: Add failing test case for LargeParameter.ql
2019-01-11 11:53:04 +01:00
Geoffrey White
0a27022dd4
Merge pull request #523 from jbj/placement-new-never-freed
...
C++: Detect non-allocating placement new in cpp/memory-never-freed
2018-11-23 09:40:11 +00:00
Geoffrey White
ea56a5d9ce
CPP: Add local dataflow to (one bit of) OverflowStatic.ql.
2018-11-22 15:49:13 +00:00
Geoffrey White
01ba635e1d
CPP: Add some test cases involving dataflow.
2018-11-22 15:49:13 +00:00
Jonas Jensen
75873bb4a6
C++: Detect non-allocating placement new
...
This adds a `NewOrNewArrayExpr.getPlacementPointer` predicate and uses
it in `Alloc.qll` to detect when a `new`-expression is not an
allocation.
User-defined replacements for `operator new` may not be allocations
either, but the code continues to assume that they are. It's possible
that we want to change this assumption in the future or leave it up to
individual queries to decide on which side to err. It's hard to
statically tell whether `operator new` has been overloaded in a
particular file because it can be overloaded by a definition that is not
in scope but is only linked together with that file.
2018-11-22 11:31:19 +01:00
Jonas Jensen
a17debac3e
C++: Placement-new tests for MemoryNeverFreed.ql
2018-11-22 10:48:18 +01:00
Robert Marsh
7bcc4379fc
C++: accept loops with arbitrary labels or cases
2018-10-22 09:59:49 -07:00
Robert Marsh
17537bb88b
C++: respond to doc comments
2018-10-17 11:57:54 -07:00
Robert Marsh
73cae5390e
C++: new query for dead code after goto or break
2018-10-16 15:37:06 -07:00
Dave Bartolomeo
1f36f5552f
Normalize all text files to LF
...
Use `* text=auto eol=lf`
2018-09-23 16:24:31 -07:00
Dave Bartolomeo
d920fc7d94
Force LF line endings for .ql, .qll, and .qlref files
2018-08-24 11:58:58 -07:00
Nick Rolfe
3444fb7b88
C++: remove all uses of deprecated 'extractor_flags'
2018-08-07 09:48:27 +01:00
Pavel Avgustinov
b55526aa58
QL code and tests for C#/C++/JavaScript.
2018-08-02 17:53:23 +01:00