-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Treat Char/Bool as requiring marshalling #113602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issue #113599 by adjusting the marshalling behavior for char and bool types. It updates the primitive type check in MarshalHelpers.Aot.cs and adds unit tests to verify the correct sizes for char and bool.
- Updated IsStructMarshallingRequired condition to treat bool and char as requiring marshalling.
- Added unit tests verifying that Marshal.SizeOf returns the expected values for char and bool.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.Aot.cs | Updated the condition to ensure bool and char are not skipped from marshalling. |
src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs | Added tests to verify the expected sizes for char and bool marshalling. |
src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.Aot.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.Aot.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
…Aot.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com>
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.Aot.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g unrelated wasm timeout |
Fixes #113599