-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harden InterproceduralAnalysisConfiguration to prevent null tree argu… #4492
Conversation
…ment Change the API argument for `InterproceduralAnalysisConfiguration.Create` to avoid null syntax tree being passed into it. Fixes dotnet#4491. I will create a separate PR to port the fix to 2.9.x branch
@@ -40,16 +40,16 @@ public struct InterproceduralAnalysisConfiguration : IEquatable<InterproceduralA | |||
public static InterproceduralAnalysisConfiguration Create( | |||
AnalyzerOptions analyzerOptions, | |||
DiagnosticDescriptor rule, | |||
ISymbol symbol, | |||
ControlFlowGraph cfg, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the core change, everything else in the PR is just boiler plate changes. For VB assembly attributes, owning symbol of operation block callback is the global namespace symbol, whose first location is some embedded source with null syntax tree.
@dotpaul - I figured out that this issue does not repro on 2.9.x branch as the support for passing in Lines 40 to 47 in ed4a12c
|
Codecov Report
@@ Coverage Diff @@
## release/5.0.2xx #4492 +/- ##
===================================================
- Coverage 95.79% 95.79% -0.01%
===================================================
Files 1164 1164
Lines 264445 264459 +14
Branches 15976 15979 +3
===================================================
+ Hits 253322 253330 +8
- Misses 9098 9101 +3
- Partials 2025 2028 +3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Thanks you Paul! |
…ment
Change the API argument for
InterproceduralAnalysisConfiguration.Create
to avoid null syntax tree being passed into it.Fixes #4491.
I will create a separate PR to port the fix to 2.9.x branch