Skip to content

Try to reproduce AccessViolationException on arm64 #103

@adamsitnik

Description

@adamsitnik

.NET runtime users are hunted by these two bugs: dotnet/runtime#123324 and dotnet/runtime#112167.

Let's do the following:

  • Add new C# console app to the solution. Let's name it "AVRepro"
  • Use following MSBuild settings:
    <PropertyGroup>
      <OutputType>Exe</OutputType>
      <TargetFramework>net10.0</TargetFramework>
      <SelfContained>true</SelfContained>
      <PublishSingleFile>true</PublishSingleFile>
      <EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
    </PropertyGroup>
  • Add reference to Library.csproj project file
  • Add a logic that runs the following code if no args were specified:
  using System.Diagnostics;

  var tasks = Enumerable.Range(0, 2)
      .Select(i => Task.Run(async () =>
      {
          var psi = new ProcessStartInfo
          {
              FileName = "/bin/echo",
              Arguments = "hello!",
          };
          using var process = Process.Start(psi)!;
          await process.WaitForExitAsync();
      }));

  await Task.WhenAll(tasks);
  • Add a logic that uses the new API (ChildProcess.ExecuteAsync) to do the same when args were specified.

  • Extend the macOS CI leg with logic that achieves the following:

  dotnet publish -c Release -r osx-arm64
  ./bin/Release/net10.0/osx-arm64/publish/AVRepro --useNewAPI
  ./bin/Release/net10.0/osx-arm64/publish/AVRepro

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions