Tom Hvitved
b69188fee9
C#: Adopt shared CFG construction library from shared controlflow pack
2023-08-03 14:12:24 +02:00
Tom Hvitved
3c173df69e
C#: Update expected test output
2023-05-15 09:35:20 +02:00
Michael Nebel
59993ea347
C#: Update expected test output.
2023-05-11 11:12:24 +02:00
Michael Nebel
bd0133630d
C#: Re-factor the CIL dataflow test to use the new API.
2023-05-08 14:05:37 +02:00
Mathias Vorreiter Pedersen
177dd76da6
C#: Accept consistency changes.
2023-05-03 20:30:06 +01:00
Michael Nebel
0dc612f23f
C#: Re-factor the TaintTracking test.
2023-04-12 11:15:14 +02:00
Michael Nebel
89de6cb8a0
C#: Update library tests.
2023-01-31 13:20:59 +01:00
Michael Nebel
29ccac8e93
C#: Address review comments.
2022-12-06 12:05:48 +01:00
Michael Nebel
0a3295ef3f
C#: Address review comments.
2022-12-06 11:59:13 +01:00
Michael Nebel
38e906f854
C#: Use hasQualifiedName instead of getQualifiedName.
2022-12-06 11:59:13 +01:00
Michael Nebel
c24302bec2
C#: Replace all uses of the deprecated hasQualifiedName/1 predicate.
2022-12-06 11:59:12 +01:00
Erik Krogh Kristensen
ff73dbc35c
delete redundant imports
2022-04-22 12:55:28 +02:00
Tom Hvitved
c4ad237a5c
C#: Update expected test output
2022-02-02 19:25:30 +01:00
Anders Schack-Mulligen
7b98ca9b0a
C#: Adjust qltest expected output.
2022-01-18 10:36:52 +01:00
Tom Hvitved
bef05f885c
C#: Update CIL data flow tests
2021-09-07 13:02:20 +02:00
Tamas Vajk
5e2770339f
Add adjusted expected files
2021-07-01 16:09:11 +02:00
Tamas Vajk
03d1a3e0ad
Trim test files + remove duplicate newlines
2021-07-01 16:09:11 +02:00
Tamas Vajk
c29d11087b
C#: Start using 'options' files in tests
2021-07-01 16:08:47 +02:00
Tamas Vajk
6205ec233c
Fix more failing tests
2021-03-02 09:21:24 +01:00
Tom Hvitved
d39a33655f
C#: Fix false-positives in cs/dereferenced-value-may-be-null
...
Dereferencing an expression of a nullable type should only be reported when
the expression is not clearly non-null.
2020-07-28 16:27:36 +02:00
Tom Hvitved
a344707baa
C#: Add more data flow tests
...
Add tests that exhibit missing type pruning.
2019-12-10 15:46:31 +01:00
Calum Grant
051dd6b3dc
C#: Update qltests.
2019-11-14 17:14:51 +00:00
Calum Grant
4e2e64e949
C#: Fix up CallableReturns tests.
2019-11-08 16:42:22 +00:00
Calum Grant
b9ba534bcb
C#: Update qltest output.
2019-10-24 11:06:34 +01:00
Tom Hvitved
c5d9d74c0a
C#: Nested field flow
2019-08-23 09:25:05 +02:00
Jonas Jensen
11583b69e0
C#: Use pyrameterized modules for TaintTracking
...
To keep the code changes minimal, and to keep the implementation similar
to C++ and Java, the `TaintTracking{Public,Private}` files are now
imported together through `TaintTrackingUtil`. This has the side effect
of exposing `localAdditionalTaintStep`. The corresponding predicate for
Java was already exposed.
2019-08-20 13:45:38 +02:00
semmle-qlci
f58c7cc79c
Merge pull request #1446 from hvitved/csharp/cached-stages
...
Approved by calumgrant
2019-06-27 08:03:24 +01:00
Tom Hvitved
51d093add0
C#: Address review comments
2019-06-25 17:01:48 +02:00
Tom Hvitved
a1d7382a67
C#: Update expected test output
2019-06-17 20:07:54 +02:00
Tom Hvitved
0ee5fe88d9
CIL: Account for multiple VariableUpdate::getSource()s in nullness analysis
...
For methods compiled without optimization (and possibly also with optimization),
it is possible for a variable update to have multiple possible assigned values.
For example, the non-optimized CIL for
```
return cond ? null : "not null"
```
is
```
0: nop
1: ldarg.0
2: ldfld cond
3: brtrue.s 6:
4: ldstr "not null"
5: br.s 7:
6: ldnull
7: stloc.0 L0 // stores either `null` or "not null"
8: br.s 9:
9: ldloc.0
10: ret
```
Consequently, an existential in `CallableReturns.qll` must be a `forex`.
2019-05-28 10:13:00 +02:00
Tom Hvitved
4fc61ebbf3
C#: Add tests for maybe-null CIL methods
2019-05-28 10:05:33 +02:00
Tom Hvitved
6c182564e7
C#: Adjustments to CIL/nullness analyses
...
- Cache predicates in the same stage using a cached module.
- Introduce `DefUse::defUseVariableUpdate()` and use in `CallableReturns.qll`.
The updated file `csharp/ql/test/library-tests/cil/dataflow/Nullness.expected`
demonstrates why this is needed.
- Utilize CIL analysis in `Guards::nonNullValue()`.
- Analyze SSA definitions in `AlwaysNullExpr`, similar to `NonNullExpr`.
2019-03-22 15:11:31 +01:00
calum
449e65d467
C#: Update expected outputs.
2019-03-19 15:11:19 +00:00
calum
d5a4dcebd6
C#: Fix bug in dataflow library.
2019-03-18 17:59:56 +00:00
calum
e1e657c1e8
C#: Address review comments and update tests.
2019-03-18 17:59:56 +00:00
calum
e00ada443a
C#: Improve nullness and control flow by using CIL for null and throwing callables.
2019-03-12 16:13:29 +00:00
calum
8afbd2d897
C#: Extend TrivialProperty to also include CIL::TrivialProperty
2019-02-07 12:05:42 +00:00
Tom Hvitved
231465143d
C#: Autoformat QL tests
2018-12-20 10:19:59 +01:00
Pavel Avgustinov
b55526aa58
QL code and tests for C#/C++/JavaScript.
2018-08-02 17:53:23 +01:00