Commit Graph

1446 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
ed9ad8b5e3 Merge branch 'main' into better-syntax-for-false-positives-and-negatives-inline-expectation 2020-10-31 16:52:16 +01:00
Cornelius Riemenschneider
84fe7ba199 C++: Add support for StmtExpr to Print AST. 2020-10-30 15:53:54 +01:00
Cornelius Riemenschneider
d3631d8f2e Merge pull request #4562 from criemen/printast-labels
C++: Change PrintAST to provide the predicates that can be used to traverse the AST.
2020-10-30 15:48:46 +01:00
Cornelius Riemenschneider
ab42ddb0dc C++: Adjust code for the conversions PR, provide correct childIndexes for the new nodes. 2020-10-30 12:48:53 +01:00
Jonas Jensen
ba41417d61 Merge pull request #4553 from geoffw0/samateregtests
C++: Additional pointer tests for DefaultTaintTracking.
2020-10-30 10:02:11 +01:00
Mathias Vorreiter Pedersen
b5234f9245 C++: Update IR inline-expectation tests 2020-10-29 19:11:54 +01:00
Cornelius Riemenschneider
4276d1f3e5 C++: Add missing comment and update test results. 2020-10-29 14:49:06 +01:00
Cornelius Riemenschneider
8c925a20a7 C++: Provide the predicates that can be used to traverse the AST as metadata. 2020-10-29 14:48:47 +01:00
Jonas Jensen
fa344d216f Merge pull request #4493 from criemen/fix-4278-printast-conversions
Fix C++ Print AST handling of Conversions
2020-10-29 13:48:15 +01:00
Cornelius Riemenschneider
59dd892748 C++: Address review, fix bug related to Conversions. 2020-10-29 11:40:31 +01:00
Mathias Vorreiter Pedersen
4be02a9463 C++: Use new syntax in field-flow tests 2020-10-29 08:48:37 +01:00
Geoffrey White
0b35b34288 C++: Add pointer tests. 2020-10-27 09:47:10 +00:00
Cornelius Riemenschneider
447ba205b4 C++: Move Conversions in PrintAST to the side. 2020-10-26 13:49:02 +01:00
Robert Marsh
aab9797c2f Merge branch 'main' into rdmarsh2/cpp/output-iterators-2
Resolve merge conflict in tests
2020-10-23 13:50:15 -07:00
Geoffrey White
ceea947f5e C++: Add another test case. 2020-10-22 12:41:23 +01:00
Geoffrey White
3cca8443f8 C++: Add memcpy(vector test. 2020-10-22 09:46:07 +01:00
Geoffrey White
227bf91626 C++: Correct test annotation. 2020-10-22 09:45:09 +01:00
Robert Marsh
413c845e97 Merge branch 'main' into rdmarsh2/cpp/output-iterators-2
Accept test changes for unnamed elements
2020-10-20 15:22:08 -07:00
Mathias Vorreiter Pedersen
528afc55ab Merge pull request #3788 from geoffw0/callderef
C++: Add bcopy to models and use it.
2020-10-20 12:15:23 +02:00
Ian Lynagh
987c16ed53 Merge remote-tracking branch 'upstream/main' into igfoo/unnamed 2020-10-19 19:09:41 +01:00
Geoffrey White
8646d5c811 C++: Fix test failure (we no longer have taint flow from the size parameter). 2020-10-19 17:37:11 +01:00
Dave Bartolomeo
a80c6fbf97 C++: Print target variable name for Load and Store, if known
Now that we've started printing the targets of `Call` instructions in the IR dumps, I figured I might as well print the names of the variable being loaded or stored as well. We could potentially extend this to match fields, array elements, etc., but that's quite a bit more work.
2020-10-17 14:21:27 -04:00
Robert Marsh
1f8167b47b C++: fix test annotations
Co-authored-by: Jonas Jensen <jbj@github.com>
2020-10-16 16:16:27 -04:00
Dave Bartolomeo
6a6eadcf50 C++: Print static call target for Call instruction in dumps 2020-10-16 11:53:27 -04:00
Mathias Vorreiter Pedersen
ca534ccb03 C++: Update inline expectation comments 2020-10-16 09:05:01 +02:00
Tom Hvitved
570b624eb7 C++: Update expected test output 2020-10-16 09:05:01 +02:00
Robert Marsh
fade75b0fb C++: add operator-- tests for insert iterators 2020-10-14 15:54:34 -07:00
Robert Marsh
126615a7ee C++: add prefix operator++ in inserter tests 2020-10-14 13:33:50 -07:00
Robert Marsh
a1a441d759 C++: output iterator flow through operator= models 2020-10-14 13:06:11 -07:00
Robert Marsh
f3843b8a40 Revert "C++: output iterator flow with user-defined operators"
This reverts commit 28fa26629c.
2020-10-14 13:01:37 -07:00
Ian Lynagh
9e518d2555 C++: Accept test change for p#n -> (unnamed parameter n) 2020-10-14 12:59:47 +01:00
Robert Marsh
28fa26629c C++: output iterator flow with user-defined operators 2020-10-13 16:30:47 -07:00
Robert Marsh
4b6ecfb0b1 C++: remove some constexprs in qltest 2020-10-13 16:19:15 -07:00
Robert Marsh
45a27d3296 C++: add tests for back_inserter iterator flow 2020-10-13 16:19:15 -07:00
Robert Marsh
108cc9ea47 C++: fix assignment to *iter++ 2020-10-13 16:19:15 -07:00
Robert Marsh
f39195e339 C++: add tests for assignments to *iter++ 2020-10-13 16:19:15 -07:00
Ian Lynagh
7680080701 C++: Accept unnamed-function changes to tests 2020-10-13 23:52:33 +01:00
Robert Marsh
b49aa677d0 Merge pull request #4459 from geoffw0/setex
C++: Additional taint flows through std::set
2020-10-13 15:17:54 -04:00
Robert Marsh
3b7cf7fd27 Merge pull request #4439 from geoffw0/mapex
C++: Additional taint flows through std::map
2020-10-12 14:17:17 -04:00
Jonas Jensen
0459248b9f Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-guard-overflow 2020-10-12 14:32:29 +02:00
Geoffrey White
6440db786d Merge pull request #4420 from jbj/SimpleRangeAnalysis-widen-Expr
C++: SimpleRangeAnalysis: widen recursive *, +, -
2020-10-12 11:20:09 +01:00
Geoffrey White
4363f08b45 C++: Model std::set::emplace and emplace_hint. 2020-10-12 11:01:09 +01:00
Jonas Jensen
30b9d13a45 C++: Correct annotation in test 2020-10-12 11:25:38 +02:00
Geoffrey White
5d87117dc7 C++: Model std::set::lower_bound, upper_bound, equal_range. 2020-10-12 10:10:40 +01:00
Jonas Jensen
9b12ceae8d C++: SimpleRangeAnalysis: widen recursive *, +, -
The number of candidate bounds during the main `SimpleRangeAnalysis`
recursion was in principle always exponential in the size of the
program, but in practice it did not get out of hand when only `+` and
`-` operations were supported. Now that `*` is also supported, the range
analysis started timing out on the SinaMostafanejad/OpenRDM project. The
problematic expressions in that project are of the form

    a*x*x*x + b*x*x + c*x + d

where most of the variables involved are recursive definitions and are
therefore likely to have a large number of candidate bounds.

The fix here is to identify those few binary operations that are most
likely to cause an explosion in the number of bounds and apply widening
to them. Previously, widening was only applied at definitions.
2020-10-12 11:09:01 +02:00
Jonas Jensen
bbeea452e1 C++: Add test with widening of binary Expr 2020-10-12 11:08:41 +02:00
Geoffrey White
fc19bba0bd C++: Model std::set::merge and correct test annotations. 2020-10-12 10:01:57 +01:00
Geoffrey White
c63f7cb409 C++: Taint through emplace from qualifier to return value. 2020-10-09 17:41:24 +01:00
Geoffrey White
270517d379 C++: Revise model of emplace and emplace_hint. Note that 2 of the 3 taint regressions we shouldn't be getting because we don't yet do taint through keys. 2020-10-09 17:27:18 +01:00
Geoffrey White
49c121d370 C++: More test cases covering other std::pair constructors. 2020-10-09 17:22:29 +01:00