Open Infini-PLEX opened 4 weeks ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
FWIW, the code in project can be shrunk. Here's the smallest repro I got so far:
using System.Diagnostics;
public class TesseractException : Exception
{
public override string Message
{
get
{
string message = "";
bool b = true;
message += b ? "" : "";
message += Process.ProcessorAffinity.ToString();
for (int i = 0; i < 42; ++i)
{
message += Process.Modules[42]?.ToString();
}
return message;
}
}
Process Process { get; set; }
}
The stack overflow has thousands of repeating frames on this method: Microsoft.CodeAnalysis.FlowAnalysis.DataFlow.PointsToAnalysis.PointsToAnalysis+PointsToDataFlowOperationVisitor.HandleEscapingOperation(Microsoft.CodeAnalysis.IOperation, Microsoft.CodeAnalysis.IOperation, Analyzer.Utilities.PooledObjects.PooledDictionary
2<Microsoft.CodeAnalysis.IOperation,Builder
PointsToAnalysis is not a part of compiler, it is one of the roslyn-analyzers. Going to move the issue there.
@dotnet/roslyn-analysis FYI
CC @mavasani
@arkalyanms, @JoeRobich, @sharwell this is a VS crash that seems to be mostly coming from analyzers.
Version Used:
Steps to Reproduce:
A minimal repro, with source-code provided, is ideal. Using sharplab is preferred for compiler/language issues whenever possible.
Open Program.cs: ConsoleApp12.zip
It seems that SharpLab is even stricter as code that will compile on my system will not compile there. Sharplab in gist: https://gist.github.com/Infini-PLEX/7facd1abc053f7c62357d89cc1597a94
Diagnostic Id:
Not applicable
Expected Behavior:
Intellisense to work properly.
Actual Behavior:
Stack overflow exception in the program.
Commenting out lines that add strings to messages sometimes gets the code to compile, but it is very unreliable.
Stacktrace: https://gist.github.com/Infini-PLEX/7facd1abc053f7c62357d89cc1597a94 Parallel stacktrace: https://github.com/user-attachments/assets/568961f5-4504-4e87-92d3-f96c89c6dc70