Skip to content

Disable StackallocBlkTests test on Mono - #84408

Merged
lewing merged 2 commits into
dotnet:mainfrom
EgorBo:disable-stackalloc
Apr 6, 2023
Merged

lewing merged 2 commits into
dotnet:mainfrom
EgorBo:disable-stackalloc

Conversation

@EgorBo

@EgorBo EgorBo commented Apr 6, 2023 •

Copy link
Copy Markdown
Member

Unblocks CI #84398

The following test is failing on Mono-Windows-x64:

[MethodImpl(MethodImplOptions.NoInlining)]
static void PoisonStack()
{
    var b = stackalloc byte[20000];
    Unsafe.InitBlockUnaligned(b, 0xFF, 20000);
    Consume(b);
}

[MethodImpl(MethodImplOptions.NoInlining)]
static void EnsureZeroed(byte* ptr, int size)
{
    for (int i = 0; i < size; i++)
    {
        if (ptr[i] != 0)
            throw new InvalidOperationException();
    }
}

[MethodImpl(MethodImplOptions.NoInlining)]
static void Consume(byte* ptr) { } // to avoid dead-code elimination

[MethodImpl(MethodImplOptions.NoInlining)]
public static Guid Test4096(out Guid g)
{
    const int size = 4096;
    PoisonStack();
    byte* p = stackalloc byte[size];
    EnsureZeroed(p, size);
    g = default;
    return default;
}

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 6, 2023
@ghost ghost assigned EgorBo Apr 6, 2023
@ericstj

ericstj commented Apr 6, 2023

Copy link
Copy Markdown
Member

@EgorBo does this run the failing test leg? Not seeing runtime (Build mono minijit Pri0 Runtime Tests Run windows x64 release)

@runfoapp runfoapp Bot mentioned this pull request Apr 6, 2023
@EgorBo

EgorBo commented Apr 6, 2023

Copy link
Copy Markdown
Member Author

/azp list

@azure-pipelines

Copy link
Copy Markdown
CI/CD Pipelines for this repository:

@EgorBo

EgorBo commented Apr 6, 2023

Copy link
Copy Markdown
Member Author

@EgorBo does this run the failing test leg? Not seeing runtime (Build mono minijit Pri0 Runtime Tests Run windows x64 release)

No it wasn't triggered for some reason (I assume it doesn't have a trigger for changes in issues.targers) so I pushed a blank change to the test itself.

@steveisok
steveisok self-requested a review April 6, 2023 18:42
@lewing
lewing merged commit 688c509 into dotnet:main Apr 6, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants