Robert Marsh
5ee37bcd5a
Merge branch 'master' into ir-this-parameter-2
...
Bring in fix for duplicate virtual variables for parameter indirections
2020-05-29 14:40:45 -07:00
Jonas Jensen
91da0d5567
Merge pull request #3592 from geoffw0/strlen
...
CPP: Don't taint the return value of strlen
2020-05-29 19:23:47 +02:00
Robert Marsh
6c9051ae6f
C++: accept consistency fixes
2020-05-29 09:49:28 -07:00
Mathias Vorreiter Pedersen
3adc10fdb4
C++: Accept tests
2020-05-29 15:33:55 +02:00
Geoffrey White
19c33ab41c
C++: Refine StrLenFunction, including removal of taint flow.
2020-05-29 14:04:27 +01:00
Geoffrey White
59cb5f9b1e
C++: Remove a special case for strlen in DefaultTaintTracking.
2020-05-29 14:04:26 +01:00
Geoffrey White
d77092c931
C++: Add taint tests for strlen.
2020-05-29 13:39:40 +01:00
Mathias Vorreiter Pedersen
335baaef73
C++: Add testcases for partial definitions with long access paths
2020-05-29 12:15:39 +02:00
Jonas Jensen
7d4d435f25
Merge remote-tracking branch 'upstream/master' into Expr-location-workaround
...
Conflicts:
cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected
2020-05-29 10:04:12 +02:00
Jonas Jensen
9813258a3e
Merge remote-tracking branch 'upstream/master' into Expr-location-workaround
...
Conflicts and semantic conflicts in `library-tests/dataflow/fields` and
`library-tests/ir/ir`.
2020-05-29 08:44:37 +02:00
Robert Marsh
f82c97b84a
C++: fix IR control flow for cast in placement new
2020-05-28 16:53:21 -07:00
Robert Marsh
56d0762380
C++: add test for placement new with cast
2020-05-28 16:36:26 -07:00
Robert Marsh
a897caec76
C++: outbound dataflow via this indirections
2020-05-28 15:30:41 -07:00
Robert Marsh
7dc30e3fdc
C++: add output indirections for this
2020-05-28 15:30:41 -07:00
Dave Bartolomeo
476f27e427
Merge from master
2020-05-28 17:27:08 -04:00
Dave Bartolomeo
01ef8795bf
C++: Updated fixed test expectation
2020-05-28 17:24:38 -04:00
Robert Marsh
d8b5d3bce8
C++: accept test fixes
2020-05-28 08:45:01 -07:00
Robert Marsh
693789c2cc
Merge branch 'master' into ir-this-parameter
...
Bring in new tests so their output can be fixed
2020-05-28 08:32:10 -07:00
Jonas Jensen
1b23f3ec90
C++: Accept two more changed tests
2020-05-28 11:18:14 +02:00
Jonas Jensen
9153f568be
C++: Accept test results with location fixes
2020-05-28 09:42:49 +02:00
Robert Marsh
593d4c0f32
Merge pull request #3567 from MathiasVP/ir-partial-definition
...
Implement `asPartialDefinition` for IR dataflow nodes
2020-05-27 13:51:41 -07:00
Robert Marsh
be74616b2b
C++: accept consistency test fixes
2020-05-27 12:39:54 -07:00
Dave Bartolomeo
533eeff7e8
C++: Fix MemoryLocation with multiple VirtualVariables
...
While investigating a bug with `TInstruction` sharing, I discovered that we had a case where alias analysis could create two `VirtualVariable`s for the same `Allocation`. For an indirect parameter allocation, we were using the type of the pointer variable as the type of the indirect allocation, instead of just `Unknown`. If the `IRType` of the pointer variable was the same type as the type of at least one access to the indirect allocation, we'd create both an `EntireAllocationVirtualVariable` and a `VariableVirtualVariable` for the allocation.
I added a new consistency test to guard against this in the future. This also turned out to be the root cause of the one existing known consistency failure in the IR tests.
2020-05-27 14:06:59 -04:00
Mathias Vorreiter Pedersen
bd97fe627c
Merge branch 'master' into remove-field-conflation-from-ir-fieldflow
2020-05-27 17:08:19 +02:00
Mathias Vorreiter Pedersen
97edd97778
C++: Add getLocation to TNode IPA type in testcase
2020-05-27 08:28:18 +02:00
Robert Marsh
fb46002332
C++: Fix ThisParameterNode after IR changes
2020-05-26 13:35:08 -07:00
Robert Marsh
7ad45d50c0
C++: add test case from issue
2020-05-26 11:38:14 -07:00
Geoffrey White
95537ed26f
C++: Fix mysprintf in test.
2020-05-26 18:06:14 +01:00
Geoffrey White
d96bf797ef
C++: Test layout.
2020-05-26 18:06:06 +01:00
Jonas Jensen
5deeda0337
Merge pull request #3387 from geoffw0/tostringperf
...
C++: Eliminate recursion from toString().
2020-05-26 13:24:43 +02:00
Mathias Vorreiter Pedersen
251240376b
C++: Fix asPartialDefinition for IR dataflow nodes and accept testcases
2020-05-26 13:14:38 +02:00
Mathias Vorreiter Pedersen
c5c3ffaef0
C++: Add asPartialDefinition testcases
2020-05-26 13:14:11 +02:00
Mathias Vorreiter Pedersen
b205d36933
C++: Remove chi -> load rule from simpleLocalFlowStep and accept tests
2020-05-26 11:40:26 +02:00
Dave Bartolomeo
5c20d56134
Merge pull request #3558 from jbj/qldoc-default-objc
...
C++: Properly deprecate objc.qll and default.qll
2020-05-25 14:31:25 -04:00
Jonas Jensen
85df60ea65
C++: Replace import default with import cpp
...
Some tests still used the old name for the top-level library.
2020-05-25 19:07:28 +02:00
Jonas Jensen
bc09720704
Merge pull request #3479 from geoffw0/fp2762
...
C++: Allow equality to block taint (security taint tracking)
2020-05-25 15:11:10 +02:00
Robert Marsh
b4a947ddf1
C++: add getIRVariable for this temp variables
2020-05-22 15:43:34 -07:00
Robert Marsh
8a53dc882d
C++: treat this as a parameter in IR
2020-05-22 15:35:34 -07:00
Mathias Vorreiter Pedersen
617ef32464
C++: Remove [FALSE POSITIVE] annotations
2020-05-21 02:22:57 +02:00
Mathias Vorreiter Pedersen
3c167125e5
C++: Accept test output
2020-05-20 18:18:34 +02:00
Geoffrey White
9babd5dc10
C++: Another positive effect of the change.
2020-05-20 12:49:01 +01:00
Robert Marsh
28c2acabe5
Merge pull request #3505 from dbartol/github/codeql-c-analysis-team/69
...
C++/C#: Remove `UnmodeledDefinition` instruction
2020-05-19 17:17:53 -07:00
Jonas Jensen
d38700a87c
Merge remote-tracking branch 'upstream/master' into mergeback-2020-05-19
...
Conflicts:
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/test_diff.expected
2020-05-19 17:44:15 +02:00
Jonas Jensen
5318d42c4f
Merge remote-tracking branch 'upstream/rc/1.24' into mergeback-2020-05-19
2020-05-19 14:42:58 +02:00
Jonas Jensen
486f06ab18
C++: Simplify field conflation test
...
It turned out the `memcpy` step was not even necessary.
2020-05-19 14:12:11 +02:00
Geoffrey White
7d630c458e
Merge branch 'master' into fp2762
2020-05-19 11:43:50 +01:00
Dave Bartolomeo
3758f3c48d
C++: Fix syntax-zoo test output
2020-05-18 18:07:52 -04:00
Dave Bartolomeo
42c659b8f2
C++/C#: Remove UnmodeledDefinition instruction
2020-05-18 15:08:50 -04:00
Dave Bartolomeo
35868d4e5b
C++/C#: Change dump of unmodeled use to m?
...
This is kind of inconsequential on its own, but will make the test diffs easier to understand once the next commit removes `UnmodeledDefinition`.
2020-05-18 10:47:43 -04:00
Jonas Jensen
76e194c8be
C++: Fix struct field conflation in IR data flow
...
The virtual-dispatch code for globals was missing any relationship
between the union field access and the global variable, which meant it
propagated function-pointer flow between any two fields of a global
struct. This resulted in false positives from
`cpp/tainted-format-string` on projects using SDL, such as
WohlSoft/PGE-Project.
In addition to fixing that bug, this commit also brings the code up to
date with the new style of modeling flow through global variables:
`DataFlow::Node.asVariable()`.
2020-05-18 16:24:22 +02:00