Commit Graph

64 Commits

Author SHA1 Message Date
Anders Fugmann
03bd7d7f96 C++: Update test results from OverflowStatic 2021-09-27 11:23:08 +02:00
Anders Fugmann
9a35a699cb C++: Update tests 2021-09-13 12:10:58 +02:00
Anders Fugmann
342b2df93f C++: zero or one byte sized arrays in unions are considered as having the length of the union its a member of 2021-09-13 11:25:04 +02:00
Anders Fugmann
4ab9b81a9a C++: Add tests exposing some FP's for OverflowStatic query 2021-09-13 11:09:56 +02:00
Anders Fugmann
ebdda885f9 C++: Update test annotation for OverflowStatic 2021-09-07 10:38:16 +02:00
Anders Fugmann
ddbaf585ec Merge branch 'main' into andersfugmann/improve_upper_bound 2021-09-06 10:32:44 +02:00
Anders Fugmann
d962fc4ce1 C++: Improve predicate upperBound in SimpleRangeAnalysis
If an expression has an immediate guardPhi node, this is used as a strict upper bound
2021-09-02 21:46:18 +02:00
Anders Fugmann
c110508b4e C++: Add tests to expose potential improvements available to SimpleRangeAnalysis 2021-09-02 21:20:33 +02:00
Anders Fugmann
44752d5ee0 C++: Model strdupa and strndupa string functions returning memory allocated with alloca 2021-08-18 13:12:08 +02:00
Geoffrey White
244966e216 C++: Add a test with strdup. 2021-03-30 14:49:05 +01:00
Geoffrey White
899d1ab6d8 C++: Add tests of strdup (and variants) as allocators. 2020-12-14 13:50:11 +00:00
Mathias Vorreiter Pedersen
072adaa279 C++: Require that no override of the called pure virtual function exists in any base class. This removes the false positive in the testcase. Based on the results on LGTM we have agreed to set the @precision to very-high. 2020-11-19 12:10:57 +01:00
Mathias Vorreiter Pedersen
0a6a22562b C++: Respond to more review comments.
- Remove post-dominance requirement. It was really just hiding good
  results.
- Fix test annotations. Turns out Clang and GCC's 'undefined behavior'
  warning didn't align with the C++ standard.
2020-11-13 15:44:33 +01:00
Mathias Vorreiter Pedersen
b249777bfb C++: Respond to review comments. 2020-11-13 10:44:06 +01:00
Mathias Vorreiter Pedersen
f417831a23 C++: Add two more tests to 'unsafe use of this'. First, test that post-dominance removes some results. Second, that a cast to the pure virtual function's defining class (skipping past a derived class that overrides the function) followed by a call to the function still results in an alert. This is also undefined behavior. 2020-11-12 15:51:04 +01:00
Mathias Vorreiter Pedersen
4bcf1f498b C++: Add new query for unsafe use of this. 2020-11-10 17:23:55 +01:00
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