-
Notifications
You must be signed in to change notification settings - Fork 4k
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
stackalloc should be disallowed for structs with ref fields #63104
Comments
dotnet-issue-labeler
bot
added
Area-Compilers
untriaged
Issues and PRs which have not yet been triaged by a lead
labels
Jul 31, 2022
jcouv
added
Bug
and removed
untriaged
Issues and PRs which have not yet been triaged by a lead
labels
Aug 2, 2022
Assigned to @jaredpar to adjust language rules/spec |
The spec includes the following:
This was missed in the implementation. |
Reopening since the change has been reverted - see #63367. |
Is this issue maybe a duplicate of #62528? |
@MichalPetryka, this appears to be a distinct issue from #62528, although we should test both scenarios with any potential fix. Thanks. |
4 tasks
Fixed in #64064 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version Used: Microsoft.Net.Compilers.Toolset 4.4.0-2.22379.18 (current daily build)
Steps to Reproduce:
sharplab is crashing on this repro.
Expected Behavior:
Build error. stackalloc should be disallowed for structs with ref fields.
Actual Behavior:
Builds successfully, the program has GC hole at runtime.
The text was updated successfully, but these errors were encountered: