Mathias Vorreiter Pedersen
dda3aaa8aa
C++: Add QLDoc to public classes and predicates
2020-04-02 14:00:33 +02:00
Mathias Vorreiter Pedersen
af9e05b9cd
C++: Accept test
2020-04-02 10:57:11 +02:00
Mathias Vorreiter Pedersen
020c273dc9
Merge branch 'master' into ir-flow-fields
2020-04-02 10:45:58 +02:00
Robert Marsh
bbb69d524e
Merge pull request #3188 from geoffw0/swap4
...
C++: Add a user defined swap function to taint tests.
2020-04-01 17:28:46 -07:00
Geoffrey White
6b5f4d9e12
Merge branch 'master' into av114
2020-04-01 18:23:21 +01:00
Geoffrey White
7a98919879
C++: Add a non-standard swap to taint tests.
2020-04-01 17:14:38 +01:00
Tom Hvitved
42e180d6c4
Merge pull request #3060 from aschackmull/dataflow/no-param-to-same-param-flow
...
Dataflow: Exclude param-param flow through with identical params.
2020-04-01 09:42:12 +02:00
Jonas Jensen
7b7ff1fb3a
Merge pull request #3089 from geoffw0/sideeffect
...
CPP: Add side effect models for strcpy and strcat.
2020-03-31 12:11:04 +02:00
Jonas Jensen
531ef64c5d
C++: Fix other copies of the argHasPostUpdate test
2020-03-30 17:45:53 +02:00
Jonas Jensen
dd322be238
C++: Remove noise from argHasPostUpdate check
...
This consistency check seems to have value for AST data flow, but I've
disabled it on the IR for now.
This commit also includes two unrelated changes that seem to fix a
semantic merge conflict.
2020-03-30 15:51:11 +02:00
Geoffrey White
6d6ad4a0ae
Merge branch 'master' into sideeffect
2020-03-30 14:16:23 +01:00
Tom Hvitved
9fa9c10361
Merge pull request #2921 from aschackmull/dataflow/consistency-checks
...
Java: Add data-flow consistency checks.
2020-03-30 12:47:41 +02:00
Anders Schack-Mulligen
caf0d1528f
Merge pull request #3155 from max-schaefer/add-module-comment
...
Data flow: Add module doc comment for `TaintTrackingImpl.qll`
2020-03-30 12:07:08 +02:00
Max Schaefer
e5e94e3357
Data flow: Add module doc comment for TaintTrackingImpl.qll
...
Modelled after the correponding comment for `DataFlowImpl.qll`.
2020-03-30 10:35:47 +01:00
Anders Schack-Mulligen
57c9277601
Merge pull request #3142 from MathiasVP/no-magic-in-parameterThroughFlowCand
...
Data flow: No magic in returnFlowCallableCand
2020-03-30 10:15:48 +02:00
Mathias Vorreiter Pedersen
7fce4ce9d1
Include join order fix from #3142
2020-03-28 12:34:05 +01:00
Dave Bartolomeo
3039aaf4f3
C++: Fix test expectations for complex literals
2020-03-27 10:33:19 -04:00
Mathias Vorreiter Pedersen
5ba5791ec6
C++: Only allow flow through non-conflated chi instructions
2020-03-27 13:37:17 +01:00
Mathias Vorreiter Pedersen
580310f321
Merge branch 'master' into ir-flow-fields
2020-03-27 13:32:26 +01:00
Mathias Vorreiter Pedersen
7890a322c8
C++/C#/Java: Sync identical files
2020-03-27 11:51:38 +01:00
Mathias Vorreiter Pedersen
9ab8580ca7
Data flow: No magic in parameterThroughFlowCand
2020-03-27 11:51:10 +01:00
Jonas Jensen
2801941ca2
C++: Never track flow out of an argv argument
...
This change removes some duplicate results that will otherwise appear
due to https://github.com/Semmle/ql/pull/3123 and possibly
https://github.com/Semmle/ql/pull/2704 .
2020-03-26 20:40:16 +01:00
Dave Bartolomeo
7879dde8b8
Merge pull request #3097 from jbj/detect-conflated-memory
...
C++: Implement Instruction.isResultConflated
2020-03-26 14:52:47 -04:00
Mathias Vorreiter Pedersen
a43abaaed9
Merge branch 'master' into ir-flow-fields
2020-03-26 11:51:07 +01:00
Mathias Vorreiter Pedersen
c6c613840a
C++: Removed toString from PostUpdateNodes. They were more confusing than helpful
2020-03-26 11:43:40 +01:00
Mathias Vorreiter Pedersen
fbef146a49
C++: Remove PositionalArgumentWithoutWriteSideEffectNode (since not all arguments need a PostUpdateNode). Also generalized the added flow rule in simpleLocalFlowStep since there isn't always a ChiInstruction - for instance of it's a write to a struct that only has a single field.
2020-03-26 11:39:20 +01:00
Robert Marsh
e6cdbb9bd2
Merge pull request #3121 from dbartol/dbartol/ir-generate-all-fixup
...
C++: Late fix for PR feedback
2020-03-25 17:58:01 -07:00
Jonas Jensen
bc3bdbb11b
C++: Improve QLDoc for Function.getParameter
2020-03-25 15:21:24 +01:00
Dave Bartolomeo
1edd492abf
C++: Late fix for PR feedback
...
I missed this suggestion before I merged the original PR. Fixing it now before I forget.
2020-03-25 10:10:30 -04:00
Dave Bartolomeo
376779421d
Merge pull request #2975 from rdmarsh2/printir-generate-all
...
C++/C#: generate IR for funcs excluded in PrintIR
2020-03-25 09:45:02 -04:00
Jonas Jensen
2b2667aef7
Merge remote-tracking branch 'upstream/master' into detect-conflated-memory
...
Conflicts:
cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRSanity.qll
cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRSanity.qll
cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRSanity.qll
cpp/ql/test/library-tests/ir/ir/aliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ir/aliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/ir/ir/raw_sanity.expected
cpp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ssa/aliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_sanity.expected
cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_sanity_unsound.expected
cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_sanity.expected
cpp/ql/test/library-tests/syntax-zoo/raw_sanity.expected
cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_sanity.expected
csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRSanity.qll
csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/IRSanity.qll
csharp/ql/test/library-tests/ir/ir/raw_ir_sanity.expected
csharp/ql/test/library-tests/ir/ir/unaliased_ssa_sanity.expected
2020-03-25 11:55:39 +01:00
Mathias Vorreiter Pedersen
f92dd3c565
C++: Autoformat
2020-03-24 22:28:55 +01:00
Mathias Vorreiter Pedersen
077c282cd3
C++: Add field flow and accept tests
2020-03-24 22:28:54 +01:00
Mathias Vorreiter Pedersen
a5f08e1ea6
C++: Split parameter node class into an explicit and implicit version
2020-03-24 22:28:54 +01:00
Mathias Vorreiter Pedersen
22381f3ee6
C++: Demonstrate amount of field flow already present
2020-03-24 22:28:54 +01:00
Jonas Jensen
8f419d1676
C++: Fix conflated-memory sanity query
...
I had included `InitializeNonLocal` in the recursion because it made
everything look better in the presence of a bug that's since been fixed.
Taking it out means the sanity test is again aligned with the old
`isChiForAllAliasedMemory`.
2020-03-24 16:46:59 +01:00
Jonas Jensen
4e588869d8
C++: Sync identical files
2020-03-24 16:46:42 +01:00
Jonas Jensen
27832148a9
C++: Phi-node conflation is not about vvars
2020-03-24 13:56:42 +01:00
Jonas Jensen
95a8dcb3fd
C++: failing test for non-conflated escaped var
2020-03-24 13:31:08 +01:00
Dave Bartolomeo
bebf89fed5
C++: Accept test diffs
...
All changes look like real improvements.
2020-03-23 17:20:19 -04:00
Jonas Jensen
999051d20e
C++: QLDoc terminology: object -> mem allocation
2020-03-23 20:32:47 +01:00
Dave Bartolomeo
c5ac357bfc
C++/C#: Fix bad overlap sanity failures
...
`Instruction.getDefinitionOverlap()` depends on `SSAConstruction::getMemoryOperandDefinition()`, which in turn depends on `SSAConstruction::hasMemoryOperandDefinition()`. When the definition in question came from a `Chi` instruction, `hasMemoryOperandDefinition()` incorrectly bound `overlap` to the overlap relationship between the original (non-`Chi`) instruction and the use. The fix is to make use of the `actualDefLocation` parameter to `getDefinitionOrChiInstruction()`, which specifies the location for the result of the `Chi` in that case.
2020-03-23 14:57:41 -04:00
Jonas Jensen
b0d3c9ee6b
C++: Fix getExtentOverlap for entire allocation
2020-03-23 19:49:39 +01:00
Dave Bartolomeo
a2741da8e2
C++/C#: Add sanity test for invalid overlap from getDefinitionOverlap()
...
The result of `getDefinitionOverlap()` should never be `MayPartiallyOverlap`, because if that were the case, we should have inserted as `Chi` instruction and hooked the definition up to that instead.
There are quite a few existing failures.
2020-03-23 14:37:06 -04:00
Anders Schack-Mulligen
f29f0f418f
Dataflow: Exclude flow param-param flow through with identical params.
2020-03-23 17:27:53 +01:00
Jonas Jensen
13465921a3
Merge pull request #3092 from dbartol/dbartol/VarArgIR2_ElectricBoogaloo
...
C++: Better IR for varargs
2020-03-23 14:13:54 +01:00
Anders Schack-Mulligen
888c504f55
Merge pull request #2903 from hvitved/dataflow/performance
...
Data flow: Refactoring + performance improvements
2020-03-23 10:01:20 +01:00
Jonas Jensen
79d5b88e33
C++: Remove redundant case
2020-03-20 19:40:53 +01:00
Dave Bartolomeo
fb71f781a0
C++: Fix formatting
2020-03-20 14:23:58 -04:00
Jonas Jensen
f6f9afe462
C++: Implement Instruction.isResultConflated
...
This predicate replaces `isChiForAllAliasedMemory`, which was always
intended to be temporary. A test is added to `IRSanity.qll` to verify
that the new predicate corresponds exactly with (a fixed version of) the
old one.
The implementation of the new predicate,
`Cached::hasConflatedMemoryResult` in `SSAConstruction.qll`, is faster
to compute than the old `isChiForAllAliasedMemory` because it uses
information that's readily available during SSA construction.
2020-03-20 17:57:18 +01:00