Uh oh!
There was an error while loading. Please reload this page.
Make it possible to preinitialize ComInterfaceEntry - #114459
Merged
Merged
Conversation
Fixesdotnet#114355. Special case `ComWrappers.ComInterfaceEntry` and types that only consist of these fields to achieve this.
Contributor
There was a problem hiding this comment.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs:2705
- In the Clone method of VTableLikeStructValue (line 2705), passing null for fieldThatOwnsMemory may cause loss of necessary context. Consider preserving the existing fieldThatOwnsMemory if applicable.
return new VTableLikeStructValue(_type, (MethodDesc[])_methods.Clone(), fieldThatOwnsMemory: null);
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs:2727
- The MemoryOwner property in VTableLikeSlotReferenceValue returns a non-null value only when _index is 0. Verify that this behavior is intentional for all indices.
public override FieldDesc MemoryOwner => _index == 0 ? _fieldThatOwnsMemory : null;
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs:2491
- In the IsCompatible method of ComInterfaceEntryArrayValue, entryType is overwritten for each non-static field without verifying that all fields share the same ComInterfaceEntry type. Consider adding an explicit check to ensure consistency across all instance fields.
foreach (FieldDesc field in type.GetFields()) { ... entryType = field.FieldType; ... }
Contributor
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
Sergio0694
commented
Apr 10, 2025
Contributor
jkotas
reviewed
Apr 12, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkotas
approved these changes
Apr 21, 2025
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#114355.
Special case
ComWrappers.ComInterfaceEntryand types that only consist of these fields to achieve this.Cc @dotnet/ilc-contrib @Sergio0694