Skip to content

Add support to add new FieldRVAs to EnC - #114463

Merged
AaronRobinsonMSFT merged 7 commits into
dotnet:mainfrom
AaronRobinsonMSFT:enc_fieldrva
Apr 16, 2025
Merged

Add support to add new FieldRVAs to EnC#114463
AaronRobinsonMSFT merged 7 commits into
dotnet:mainfrom
AaronRobinsonMSFT:enc_fieldrva

Conversation

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member

Fixes #112446

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member Author

/cc @dotnet/dotnet-diag

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member Author

/cc @tmat

@noahfalk noahfalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't clear from #112446, is this experimental or this fully supported going forward? Jan seemed to have concerns. Is the plan that all diagnostic testing for this is going to come from Roslyn?

In terms of the code it seemed reasonable to me but I'm not a type system expert.

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member Author

is this experimental or this fully supported going forward?

This would be fully supported.

Is the plan that all diagnostic testing for this is going to come from Roslyn?

Nope. I'll be submitting additional testing in other places in the coming days.

Comment thread src/coreclr/vm/field.h Outdated
Comment thread src/coreclr/vm/field.h Outdated
Comment thread src/coreclr/vm/methodtablebuilder.cpp Outdated
Comment thread src/coreclr/vm/field.h
Comment thread src/coreclr/vm/field.cpp
@jkotas

jkotas commented Apr 10, 2025

Copy link
Copy Markdown
Member

I'll be submitting additional testing in other places in the coming days.

I assume that it will be new test under https://github.com/dotnet/runtime/tree/main/src/libraries/System.Runtime.Loader/tests/ApplyUpdate

Comment thread src/coreclr/vm/ceeload.cpp
Logging updates.
@AaronRobinsonMSFT

Copy link
Copy Markdown
Member Author

This is ready for official review. I'll add disabled tests on Monday.

@AaronRobinsonMSFT
AaronRobinsonMSFT marked this pull request as ready for review April 11, 2025 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/b091942.il: Language not supported

@jkotas

jkotas commented Apr 11, 2025

Copy link
Copy Markdown
Member

LGTM

@AaronRobinsonMSFT
AaronRobinsonMSFT merged commit 40f209c into dotnet:main Apr 16, 2025
@AaronRobinsonMSFT
AaronRobinsonMSFT deleted the enc_fieldrva branch April 16, 2025 18:09
ApplyUpdateUtil.ApplyUpdate(assm);

{
var lrosLen = ApplyUpdate.Test.AddFieldRVA.LocalReadOnlySpan();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests should verify that the content of the RVA field is expected. None of these tests seem to be actually verifying that the RVAs of the added fields are right (length is not part of the RVA blob).

(It is fine to do this as part of the tests enablement.)

// Assert.Equal(5, mfaLen);
var utf8ros = ApplyUpdate.Test.AddFieldRVA.Utf8LiteralReadOnlySpan();
Assert.Equal(6, utf8ros.Length);
var strlit = ApplyUpdate.Test.AddFieldRVA.StringLiteral();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect that this will create RVA field only when the RVA strings Roslyn feature is turned on, with artificially low threshold. This will need change in the .csproj file to turn the feature on with artificially low threshold. It can use comment as well.

@github-actions github-actions Bot locked and limited conversation to collaborators May 17, 2025
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.

[FeatureRequest]: Support edits to FieldRVAs in the runtime for EditAndContinue/etc.

6 participants