Problem
The analyzer must detect potentially unsafe dereferences after a possible null while accounting for branches, loops, and control-flow joins.
C# · Roslyn · static analysis · data-flow
The analyzer must detect potentially unsafe dereferences after a possible null while accounting for branches, loops, and control-flow joins.
The analyzer must detect potentially unsafe dereferences after a possible null while accounting for branches, loops, and control-flow joins.
The analysis must converge correctly across branches, loops, and join points without path explosion.
Roslyn ControlFlowGraph with forward fixed-point data-flow analysis: Unknown/MaybeNull/NotNull states propagate across basic blocks and merge at join points.
Diagnostics for potentially unsafe dereference paths over the real CFG, with successor reprocessing until the data-flow state reaches a fixed point.
Analyzer tests plus fixed-point worklist convergence over the Roslyn CFG, including branches and loops.
CFG/data-flow implementation, merge logic, diagnostics, and analyzer tests.