-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change stack size on all Apple and desktop platforms to at least 1.5MB (
#98007) * Change stack size to 1.5MB on all desktop platforms & re-enable some tests * Re-enable some tests, and respect `IlcDefaultStackSize` on Windows - Re-enable disabled tests tracked by #1417 and #2084 - Make stack size configurable on NAOT via `IlcDefaultStackSize` on Windows
- Loading branch information
Showing
11 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Threading; | ||
using System.Runtime.CompilerServices; | ||
using Xunit; | ||
|
||
namespace test87879; | ||
|
||
public class test87879 | ||
{ | ||
[Fact, SkipLocalsInit] | ||
public static void TestEntryPoint() | ||
{ | ||
//determine the expected available stack size 1.5MB, minus a little bit (384kB) for overhead. | ||
var expectedSize = 0x180000 - 0x60000; | ||
|
||
//allocate on the stack as specified above | ||
Span<byte> bytes = stackalloc byte[expectedSize]; | ||
Consume(bytes); | ||
Console.WriteLine("Main thread succeeded."); | ||
|
||
//repeat on a secondary thread | ||
Thread t = new Thread([SkipLocalsInit] () => | ||
{ | ||
Span<byte> bytes = stackalloc byte[expectedSize]; | ||
Consume(bytes); | ||
}); | ||
t.Start(); | ||
t.Join(); | ||
Console.WriteLine("Secondary thread succeeded."); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static void Consume(Span<byte> bytes) | ||
{ | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/tests/Regressions/coreclr/GitHub_87879/test87879.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<RequiresProcessIsolation>true</RequiresProcessIsolation> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<CLRTestTargetUnsupported>true</CLRTestTargetUnsupported> | ||
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' == 'true' OR '$(TargetsAppleMobile)' == 'true' OR ('$(TargetsUnix)' == 'true' AND '$(TargetsMobile)' != 'true')">false</CLRTestTargetUnsupported> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="test87879.cs" /> | ||
</ItemGroup> | ||
</Project> |