-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Fix CA2014: Stackalloc in loops #13531
Copy link
Copy link
Closed
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
Metadata
Metadata
Assignees
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
We currently suppress warnings of CA2014 in parts of the build.
stackallocs in loops can cause stack overflows, so we need to refactor our code to fix this.See:
PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
Line 2579 in 78d0d0e
PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
Line 308 in 78d0d0e
PowerShell/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Lines 787 to 788 in 78d0d0e
Suppression added in #13530