Mathias Vorreiter Pedersen
ccdaf49464
C++: Fix the same bug in the test for ordered maps.
2021-11-10 13:24:27 +00:00
Mathias Vorreiter Pedersen
86d78b34aa
C++: Use the correct variable in the 'test'.
2021-11-10 13:04:48 +00:00
Mathias Vorreiter Pedersen
fff5d293ff
Merge branch 'main' into use-shared-ssa-in-ir-dataflow
2021-11-08 10:44:36 +00:00
Mathias Vorreiter Pedersen
0d1ff4d2ee
C++: Respond to review comments and accept test changes.
2021-11-04 11:13:23 +00:00
Mathias Vorreiter Pedersen
ae4b6c54bc
C++: Change the structure of the 'annotate_path_to_sink' tests to better test path-explanations.
2021-11-03 20:32:05 +00:00
Mathias Vorreiter Pedersen
675e284c0e
C++: A 'LoadInstruction' in a store chain always sets 'certain = false'.
2021-10-28 14:52:57 +01:00
Mathias Vorreiter Pedersen
2cd23e5ee0
Accept test changes.
2021-10-28 12:36:36 +01:00
Mathias Vorreiter Pedersen
21a1ee7758
C++: Add annoying case in SSA.qll related to 'NewExpr' and accept test changes.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
3efe60fdd2
C++: Accept test changes.
2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
3a488574e5
C++: Rewrite the PartialDefinitionNode classes to match the new StoreNodes.
2021-10-28 12:35:00 +01:00
Mathias Vorreiter Pedersen
0679142607
C++: Accept test changes.
2021-10-01 18:27:55 +02:00
Anders Schack-Mulligen
f30dad7705
Dataflow: Update test expected outputs.
2021-09-07 13:02:20 +02:00
Alexandre Boulgakov
10bc2568b7
C++: Add support for default member initializers.
2021-08-26 12:32:30 +01:00
Anders Fugmann
0b98b39f91
C++: Test dataflow tests for strdupa and strndupa functions
2021-08-18 15:22:14 +02:00
Mathias Vorreiter Pedersen
bbb38fd2aa
C++: Accept more test changes.
2021-07-29 15:49:50 +02:00
Mathias Vorreiter Pedersen
41d233f086
C++: Make the 'definition by reference'-node in 'foo(a.b);' a source in the 'FieldConfiguration' configuration.
2021-07-29 14:49:59 +02:00
Mathias Vorreiter Pedersen
a082172422
C++: Add testcase demonstrating missing local flow out of fields that are defined by reference.
2021-07-29 14:46:32 +02:00
Anders Schack-Mulligen
810de73246
C/C++: Update qltest expected output.
2021-06-21 14:47:31 +02:00
Robert Marsh
1f69b31239
C++: test changes in annotate_sinks_only
2021-05-06 08:14:43 -07:00
Robert Marsh
86b1d032ae
C++: accept test regressions
2021-05-06 08:14:38 -07:00
Robert Marsh
a9d7990596
C++: make unaliased_ssa IR stage sound
2021-05-06 08:14:33 -07:00
Dave Bartolomeo
383210096c
C++: Isolate models from AST dataflow's reference/object conflation
...
`DataFlowFunction` models treat references a pointers - an explicit level of indirection. The AST dataflow library generally treats references as if they were the referred-to object. This commit removes a workaround in the dataflow model for unary `operator*` on smart pointers, and makes the AST dataflow library adjust the results of querying the model so that a returned reference only gets flow that was modeled as going to the dereference of the return value.
This fixes some missing flow in IR dataflow, and recovers some (presumably) missing reverse taint flow in AST taint tracking as well.
2021-04-21 18:09:44 -04:00
Dave Bartolomeo
1d0cb0407d
Merge from main
2021-04-20 23:37:04 -04:00
Mathias Vorreiter Pedersen
61d4d17225
C++: Simplify smart pointer model and accept test changes.
2021-04-20 09:57:58 +02:00
Robert Marsh
fe57876fd8
Merge pull request #5643 from dbartol/smart-pointers/side-effect-refactor
...
C++: Refactor some side effect generation code
2021-04-14 09:59:41 -07:00
Jonas Jensen
b4f01c9afa
Merge pull request #5578 from MathiasVP/ast-flow-smart-pointers
...
C++: AST dataflow through smart pointers
2021-04-14 16:39:05 +02:00
Mathias Vorreiter Pedersen
bc7cc2f7ce
C++: Remove rule that wasn't needed.
2021-04-14 14:50:27 +02:00
Mathias Vorreiter Pedersen
da36508714
Revert "C++: As response to the review comments this commit adds a reference-to-pointer state to AddressFlow. A call to an unwrapper function now adds a pointer -> reference-to-pointer transition, and a ReferenceDereference adds a reference-to-pointer -> pointer transition."
...
This reverts commit 5aeaab7c6d .
2021-04-14 14:41:22 +02:00
Dave Bartolomeo
697b2dcde8
C++: Add missing store step for single-field struct use
...
We have special code to handle field flow for single-field structs, but that special case was too specific. Some `Store`s to single-field structs have no `Chi` instruction, which is the case that we handled already. However, it is possible for the `Store` to have a `Chi` instruction (e.g. for `{AllAliased}`), but still have a use of the result of the `Store` directly. We now add a `PostUpdateNode` for the result of the `Store` itself in those cases, just like we already did if the `Store` had no `Chi`.
2021-04-12 18:11:41 -04:00
Mathias Vorreiter Pedersen
037e6369ce
C++: Ensure all values are bound in both disjunctions.
2021-04-12 18:27:21 +02:00
Mathias Vorreiter Pedersen
5aeaab7c6d
C++: As response to the review comments this commit adds a reference-to-pointer state to AddressFlow. A call to an unwrapper function now adds a pointer -> reference-to-pointer transition, and a ReferenceDereference adds a reference-to-pointer -> pointer transition.
2021-04-12 16:01:01 +02:00
Mathias Vorreiter Pedersen
1510fe370d
C++: Add cases for const pointer wrapper references to AddressFlow and FlowVar.
2021-04-09 20:58:05 +02:00
Mathias Vorreiter Pedersen
2329b31601
C++: Replace the new SmartPointerPartialDefinition with additional steps in AddressFlow.qll
2021-04-09 20:49:45 +02:00
Mathias Vorreiter Pedersen
a460e3ad3d
Merge branch 'main' into ast-flow-smart-pointers
2021-04-09 19:41:10 +02:00
Mathias Vorreiter Pedersen
996cda9b97
C++: Fix incorrect test annotation.
2021-04-09 14:46:46 +02:00
Mathias Vorreiter Pedersen
80d5b17900
C++: Remove the dataflow rule for smart_ptr -> *smart_ptr.
2021-04-09 14:20:51 +02:00
Mathias Vorreiter Pedersen
cae0060a89
C++: Replace the new rules in DataFlowUtil with a dataflow model for pointer wrapper classes.
2021-04-09 14:06:58 +02:00
Mathias Vorreiter Pedersen
0a6aef71a2
C++: Respond to review comments.
2021-04-09 12:29:13 +02:00
Mathias Vorreiter Pedersen
8382e85901
C++: Add flow into the source of read step and out of the target of a store step for smart pointers in AST dataflow.
2021-04-06 14:05:55 +02:00
Mathias Vorreiter Pedersen
f07d844362
C++: Add a test containing missing read/store dataflow steps for smart pointers.
2021-04-06 13:59:27 +02:00
Mathias Vorreiter Pedersen
32a8b9a857
C++: Move copy constructor to its own line and accept test changes.
2021-04-06 08:56:14 +02:00
Mathias Vorreiter Pedersen
9ff894bf83
C++: Add support for AST dataflow out of functions that take a smart pointer by value.
2021-03-31 13:54:32 +02:00
Mathias Vorreiter Pedersen
8159098dc0
C++: Add test from issue #5190 .
2021-03-31 11:32:01 +02:00
Mathias Vorreiter Pedersen
09ba25fe9b
C++: Accept test changes. I'm actually not sure why we lose these results (and lose the field conflation, yay) It might be due to #3364 .
2021-03-30 10:24:01 +02:00
Mathias Vorreiter Pedersen
8c95a9ae39
Merge branch 'main' into definitions-for-unique_ptr
2021-03-30 10:20:36 +02:00
Mathias Vorreiter Pedersen
5a4efab742
C++: Add tests for shared_ptr.
2021-03-29 18:04:20 +02:00
Mathias Vorreiter Pedersen
8dc7b6403a
C++: Add shared_ptr and unique_ptr implementations. Also add some very basic tests.
2021-03-26 12:03:59 +01:00
Mathias Vorreiter Pedersen
983b64a05f
Merge branch 'main' into rdmarsh/cpp/use-taint-configuration-dtt
2021-03-26 09:11:12 +01:00
Mathias Vorreiter Pedersen
0b4650a4c9
C++: Accept test changes.
2021-03-23 10:27:19 +01:00
Mathias Vorreiter Pedersen
dd6b27df24
C++: Fix test annotation.
2021-03-16 22:35:47 +01:00