Skip to content

Commit

Permalink
Fix crashes on .NET Core 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed Oct 9, 2024
1 parent 34d8aa3 commit 9101e5d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tracer/test/Datadog.Trace.TestHelpers/EnvironmentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,13 @@ public void SetEnvironmentVariables(

// In some scenarios (.NET 6, SSI run enabled) enabling procdump makes
// grabbing a stack trace _crazy_ expensive (10s). Setting this "fixes" it.
environmentVariables["_NO_DEBUG_HEAP"] = "1";
// But for some reason, .NET Core 2.1 gets _very_ unhappy about it -
// given we don't really support .NET Core 2.1 anyway, and this _only_ happens
// when procdump is attached, just skip in that
if (_major > 2)
{
environmentVariables["_NO_DEBUG_HEAP"] = "1";
}

// Set a canary variable that should always be ignored
// and check that it doesn't appear in the logs
Expand Down

0 comments on commit 9101e5d

Please sign in to comment.