Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

Performance fix for CA5360 (Do not call dangerous methods in deserialization) - #6539

Merged
mavasani merged 2 commits into
dotnet:mainfrom
mavasani:CA5360
Mar 20, 2023
Merged

mavasani merged 2 commits into
dotnet:mainfrom
mavasani:CA5360

Conversation

@mavasani

Copy link
Copy Markdown

Performance fix for CA5360: Stop tracking intermediate methods in CA5360 analysis. This seems to cause exponential increase in allocations and memory usage during analysis.

@mavasani
mavasani requested a review from dotpaul March 20, 2023 10:19
@mavasani
mavasani requested a review from a team as a code owner March 20, 2023 10:19
@codecov

codecov Bot commented Mar 20, 2023

Copy link
Copy Markdown

Codecov Report

Merging #6539 (5455f2d) into main (89c1a9d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6539    +/-   ##
========================================
  Coverage   96.42%   96.42%            
========================================
  Files        1372     1372            
  Lines      319881   319776   -105     
  Branches    10271    10268     -3     
========================================
- Hits       308438   308348    -90     
+ Misses       8985     8976     -9     
+ Partials     2458     2452     -6     

</data>
<data name="DoNotCallDangerousMethodsInDeserializationMessage" xml:space="preserve">
<value>When deserializing an instance of class {0}, method {1} can call dangerous method {2}. The potential method invocations are: {3}.</value>
<value>When deserializing an instance of class '{0}', method '{1}' can directly or indirectly call dangerous method '{2}'</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<value>When deserializing an instance of class '{0}', method '{1}' can directly or indirectly call dangerous method '{2}'</value>
<value>When deserializing an instance of class '{0}', method '{1}' can directly or indirectly call dangerous method '{2}'.</value>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We avoid a period at the end of the message for single line messages.

@dotpaul dotpaul left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mavasani
mavasani merged commit 593a49f into dotnet:main Mar 20, 2023
@mavasani
mavasani deleted the CA5360 branch March 20, 2023 23:47
@github-actions github-actions Bot added this to the vNext milestone Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants