Skip to content

[release/6.0-rc1] [hot_reload] Don't look at delta method table rows - #57799

Merged
ericstj merged 2 commits into
release/6.0-rc1from
backport/pr-57798-to-release/6.0-rc1
Aug 20, 2021
Merged

[release/6.0-rc1] [hot_reload] Don't look at delta method table rows#57799
ericstj merged 2 commits into
release/6.0-rc1from
backport/pr-57798-to-release/6.0-rc1

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Aug 20, 2021

Copy link
Copy Markdown
Contributor

Backport of #57798 to release/6.0-rc1

/cc @lambdageek

Customer Impact

When using hot reload, making changes to a method that has not been executed yet, and then executing it, results in a crash.

Testing

CI and manual testing

Risk

Low - changes to methods that have already been executed can be applied. Restarting the app is also always a possible workaround.

Fixes#57643

Call a method for the first time after an update has been applied to it.
This will check that the interpreter or JIT does not have to rely on cached
information from the baseline (about the method signature, for example) and
that it can compute it from the delta.
The issue is that the ParamList column in EnC deltas is a "suppressed column"
that has the value 0. So when a method is updated if we use the value
directly, we will break, for example - `mono_metadata_get_param_attrs` which
expects a non-zero index in that column.
CoreCLR solves this by having a set of suppressed columns that are never
updated by deltas. (CoreCLR's model is to directly mutate the tables of the
baseline image). In Mono we can eventually do the same thing by writing the
value from the previous generation into the current delta's row. But right now
since we don't allow parameter modifications, and the only column on a Method
table that we allow to be modified is the RVA - which we look up specially - we
can just always return the baseline image row for the method table.
Fixes#57643
@ghost

Copy link
Copy Markdown

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@lambdageeklambdageek added Servicing-consider Issue for next servicing release review area-EnC-mono Hot Reload for WebAssembly, iOS/Android, etc labels Aug 20, 2021

@jeffschwMSFTjeffschwMSFT 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.

Approved. Please get a code review and we can send an request for approval for RC1.

@jeffschwMSFTjeffschwMSFT added this to the 6.0.0 milestone Aug 20, 2021
@lewinglewing added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 20, 2021
@lewing

Copy link
Copy Markdown
Member

approved in email

@ericstj
ericstj merged commit 13b1111 into release/6.0-rc1Aug 20, 2021
@lewing
lewing deleted the backport/pr-57798-to-release/6.0-rc1 branch August 20, 2021 20:23
@ghostghost locked as resolved and limited conversation to collaborators Sep 19, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-EnC-monoHot Reload for WebAssembly, iOS/Android, etcServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[hot_reload] Calling a method for the first time after an update crashes the app

5 participants

@lewing@thaystg@jeffschwMSFT@lambdageek@ericstj