Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c825f02

Browse files
committed
Fix StackTrace unit test for Release builds
Add the missing "NoInline" attribute to prevent inlining and always retrieve the correct StackTrace.
1 parent 28bf4a6 commit c825f02

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/System.Runtime.Extensions/tests/System/Environment.StackTrace.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public static void StaticFrame(object obj)
6060

6161
class TestClass
6262
{
63+
[MethodImpl(MethodImplOptions.NoInlining)]
6364
public TestClass()
6465
{
6566
EnvironmentStackTrace.StaticFrame(null);

0 commit comments

Comments
 (0)