Commit Graph

18 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
36585a7469 C++: Accept test changes. 2021-11-17 14:41:30 +00:00
Anders Schack-Mulligen
f30dad7705 Dataflow: Update test expected outputs. 2021-09-07 13:02:20 +02:00
Jonas Jensen
064568c36d Revert "Merge pull request #4784 from MathiasVP/mathiasvp/reverse-read-take-3"
This reverts commit 1b3d69d617, reversing
changes made to 527c41520e.
2021-02-03 08:49:37 +01:00
Mathias Vorreiter Pedersen
b4f9b1590d C++: Restore lost result on git/git. We lost the result in a00bd7ae02 because the added check for type T to type T* conversion didn't handle const qualifiers. 2021-01-22 14:20:18 +01:00
Mathias Vorreiter Pedersen
7b003678a9 Merge branch 'main' into mathiasvp/reverse-read-take-3 2021-01-07 11:56:18 +01:00
Mathias Vorreiter Pedersen
bb158f1857 C++: Add dataflow testcases that need flow through conflated memory. 2021-01-04 11:43:23 +01:00
Mathias Vorreiter Pedersen
ba4da72b9e C++: Add examples that require longer access paths 2020-12-22 09:14:53 +01:00
Tom Hvitved
570b624eb7 C++: Update expected test output 2020-10-16 09:05:01 +02:00
Mathias Vorreiter Pedersen
873e871620 C++: Handle more cases in arrayReadStep. 2020-09-21 14:35:37 +02:00
Mathias Vorreiter Pedersen
49dd576352 C++: Add more tests 2020-09-21 10:59:16 +02:00
Geoffrey White
86404af501 Merge pull request #4270 from MathiasVP/mathiasvp/single-field-flow-fix-cwe190test
C++: Use underlying type when checking whether a type is a single-field struct.
2020-09-16 17:21:07 +01:00
Jonas Jensen
78560833a1 C++: Add a test distilled from real code
Author: @rvermeulen.

The consistency warnings go away because `sink` is defined with a body
in this file.
2020-09-15 16:24:37 +02:00
Jonas Jensen
bdce24735c C++: Add flow through arrays
This works by adding data-flow edges to skip over array expressions when
reading from arrays. On the post-update side, there was already code to
skip over array expressions when storing to arrays. That happens in
`valueToUpdate` in `AddressFlow.qll`, which needed just a small tweak to
support assignments with non-field expressions at the top-level LHS,
like `*a = ...` or `a[0] = ...`.

The new code in `AddressFlow.qll` is copy-pasted from `EscapesTree.qll`,
and there is already a note in these files saying that they share a lot
of code and must be maintained in sync.
2020-09-15 14:46:11 +02:00
Mathias Vorreiter Pedersen
d18dd5ab09 C++: Add testcase demonstrating the underlying problem in 6ca9c449af. 2020-09-15 12:32:15 +02:00
Jonas Jensen
5a5df4de26 Revert "Merge pull request #3419 from MathiasVP/flat-structs"
There was unfortunately a semantic merge conflict between #3419 and
 #3587 that caused a performance regression on (at least) OpenJDK.

This reverts commit 982fb38807, reversing
changes made to b841cacb83.
2020-06-22 14:09:06 +02:00
Mathias Vorreiter Pedersen
b48168fc03 C++: Accept tests 2020-06-08 12:26:25 +02:00
Mathias Vorreiter Pedersen
d295e2139a C++: Accept tests after merge from master 2020-06-03 15:13:44 +02:00
Mathias Vorreiter Pedersen
b9af1123d9 C++: Make path-problem versions of ir-flow.ql and flow.ql 2020-06-02 16:28:01 +02:00