Commit Graph

19 Commits

Author SHA1 Message Date
Michael Nebel
fc03c367e9 C#: Update expected test output. 2025-01-27 10:13:19 +01:00
Michael Nebel
e53c750876 C#: Update expected output for dispatch tests. 2025-01-27 10:09:28 +01:00
Michael Nebel
d924b1a536 C#: Update test expected output. 2025-01-23 13:36:09 +01:00
Michael Nebel
bc11c23f08 C#: Add dispatch tests for overload resolution and update line numbers for existing test cases. 2025-01-23 13:33:53 +01:00
Michael Nebel
ff32a382b0 C#: Update test expected output. 2025-01-03 16:27:02 +01:00
Michael Nebel
33939a8041 C#: Update test expected output. 2025-01-03 15:36:08 +01:00
Michael Nebel
89c16abf59 C#: Add more tests for params and update expected output. 2025-01-02 11:13:09 +01:00
Tom Hvitved
57ec0948cf C#: Update expected test output 2023-11-10 08:46:15 +01:00
Michael Nebel
41b2273dee C#: Update expected test output. 2023-03-13 15:15:03 +01:00
Michael Nebel
8398ee43b3 C#: Update test comment and expected test output. 2023-03-13 10:09:03 +01:00
Michael Nebel
278f90e5fa C#: Update expected test output. 2023-03-13 10:09:03 +01:00
Michael Nebel
b7123aaa89 C#: Add viable callable testcases for regular and checked operators. 2023-02-14 12:57:59 +01:00
Tamas Vajk
9ab6c29cd3 Extend runtime callables to cover interface members with default implementation 2021-09-08 15:07:49 +02:00
Tamas Vajk
b7f13a7e1f C#: Change generic method names to include <> and type args/params 2021-09-06 11:48:22 +02:00
Tamas Vajk
5e2770339f Add adjusted expected files 2021-07-01 16:09:11 +02:00
Tom Hvitved
af5c60c341 C#: Use type unification library in virtual dispatch library 2019-11-08 12:06:05 +01:00
Tom Hvitved
f4b92137d9 C#: Add more virtual dispatch tests 2019-11-08 12:06:05 +01:00
Tom Hvitved
b2f99dbbc7 C#: Teach data flow library about CFG splitting
Data flow nodes for expressions do not take CFG splitting into account. Example:

```
if (b)
    x = tainted;
x = x.ToLower();
if (!b)
    Use(x);
```

Flow is incorrectly reported from `tainted` to `x` in `Use(x)`, because the step
from `tainted` to `x.ToLower()` throws away the information that `b = true`.

The solution is to remember the splitting in data flow expression nodes, that is,
to represent the exact control flow node instead of just the expression. With that
we get flow from `tainted` to `[b = true] x.ToLower()`, but not from `tainted` to
`[b = false] x.ToLower()`.

The data flow API remains unchanged, but in order for analyses to fully benefit from
CFG splitting, sanitizers in particular should be CFG-based instead of expression-based:

```
if (b)
   x = tainted;
   if (IsInvalid(x))
       return;
Use(x);
```

If the call to `IsInvalid()` is a sanitizer, then defining an expression node to be
a sanitizer using `GuardedExpr` will be too conservative (`x` in `Use(x)` is in fact
not guarded). However, `[b = true] x` in `[b = true] Use(x)` is guarded, and to help
defining guard-based sanitizers, the class `GuardedDataFlowNode` has been introduced.
2019-01-16 10:39:27 +01:00
Pavel Avgustinov
b55526aa58 QL code and tests for C#/C++/JavaScript. 2018-08-02 17:53:23 +01:00