Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mono] Use underlying type in RuntimeHelpers.GetSpanDataFrom #87019

Merged
merged 3 commits into from
Jun 3, 2023

Conversation

lambdageek
Copy link
Member

Make it work correctly for spans of enums

Fixes #86865

Note that in net8 RuntimeHelpers.CreateSpan is an intrinsic, so GetSpanDataFrom is never called directly.

But in net7 CreateSpan is not intrinsified on Mono, so the underlying method really does get called.

Make it work correctly for spans of enums

Fixes dotnet#86865

Note that in net8 RuntimeHelpers.CreateSpan<T> is an intrinsic, so
GetSpanDataFrom is never called directly.

But in net7 CreateSpan is not intrinsified on Mono, so the underlying
method really does get called.
@ghost ghost assigned lambdageek Jun 1, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 1, 2023
@ghost
Copy link

ghost commented Jun 1, 2023

Tagging subscribers to this area: @dotnet/area-system-runtime-compilerservices
See info in area-owners.md if you want to be subscribed.

Issue Details

Make it work correctly for spans of enums

Fixes #86865

Note that in net8 RuntimeHelpers.CreateSpan is an intrinsic, so GetSpanDataFrom is never called directly.

But in net7 CreateSpan is not intrinsified on Mono, so the underlying method really does get called.

Author: lambdageek
Assignees: lambdageek
Labels:

area-System.Runtime.CompilerServices, needs-area-label

Milestone: -

@lambdageek lambdageek removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 1, 2023
@lambdageek
Copy link
Member Author

This isn't super-critical for net8, but the intention is to backport this to net7

@lambdageek
Copy link
Member Author

/backport to release/7.0-staging

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/5147526682

@lambdageek lambdageek merged commit 75a1806 into dotnet:main Jun 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot initialize array of non-primitive type
3 participants