Uh oh!
There was an error while loading. Please reload this page.
switch to using CSTRMarshaller instead of AnsiBSTR - #55032
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| bool bPassByValueInOnly = In && !Out && !IsManagedByRef; | ||
| ILLocalVariable localBuffer = emitter.NewLocal(Context.GetWellKnownType(WellKnownType.IntPtr)); | ||
| if (bPassByValueInOnly) |
There was a problem hiding this comment.
is there a reason why this logic cant move to System.StubHelpers.CSTRMarshaler ?
There was a problem hiding this comment.
Yes, it would be nice to have majority of the logic in C#, and minimize amount of the hand-emitted IL.
@AaronRobinsonMSFT as well.. perhaps we should just fix the |
AaronRobinsonMSFT
commented
Jul 2, 2021
Updated the cleanup logic to the one implemented in ILOptimizedAllocMarshaler::EmitClearNative
Uh oh!
There was an error while loading. Please reload this page.
mangod9
commented
Jul 2, 2021
crossgen2 outerloop failures are comparable to main runs. |
mangod9
commented
Jul 6, 2021
VSadov
commented
Jul 6, 2021
Uh oh!
There was an error while loading. Please reload this page.
MichalStrehovsky
commented
Jul 7, 2021
Do we need a regression test? |
mangod9
commented
Jul 7, 2021
yeah I am hoping there are some interop tests already covering |
jkotas
commented
Jul 7, 2021
We have a lot of tests for this. The problem is that the interop stub generation in crossgen is currently only enabled for CoreLib, so it is impossible to test. We would need to enable it for everything in CoreLib version bubble to make it testable by changing this to |
mangod9
commented
Jul 7, 2021
which is being done in this PR: #54847? So a combination of the two PRs (without skipping |
jkotas
commented
Jul 7, 2021
Yes, assuming we have appropriate large version bubble test leg. |
mangod9
commented
Jul 8, 2021
with the latest change I am hitting an issue similar to this: #51189. so more of these marshallers would need updates to work with R2R |
jkotas
commented
Jul 8, 2021
I would recommend undoing the last change, and deal with the testing later. We need a unified intentionally designed set of helpers for marshalling strings that are shared between runtime-generated, crossgen-generated and source-generated interop. |
mangod9
commented
Jul 8, 2021
yeah that seems like the best approach to get this merged. Will revert that change. |
mangod9
commented
Jul 9, 2021
ok, CI is good now. crossgen2-composite failures are at par with main. |
MichalStrehovsky
commented
Jul 9, 2021
Btw, disabling the Utf8Marshaller would be as simple as deleting these two lines:
. I don't think Utf8Marshaller as it is right now works with crossgen2 at all. Looks like all of this slipped through the cracks because nobody realized it's pretty much not exercised by anything. |
mangod9
commented
Jul 9, 2021
yeah will do that as a separate change. Believe there are other ones (like |
mangod9
commented
Jul 9, 2021
Any other concerns with this? |
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.
Fixes#54820.
cc @dotnet/crossgen-contrib @MichalStrehovsky