Skip to content

[metadata] Don't access MonoTableInfo:rows, use table_info_get_rows() #49738

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

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

lambdageek
Copy link
Member

Rename the field to rows_.

Also updated some bounds checks to use mono_metadata_table_bounds_check (which
is metadata-update aware) where the subsequent lookups go through the metadata
decode functions and should just work with metadata-update.

Added FIXME: metadata-update in cases where the table row size is assumed to be
fixed or is used as a sentinel value, or where the decoding may depend on
sorting properties that metadata updates probably won't uphold.

Contributes to #44806

@ghost
Copy link

ghost commented Mar 17, 2021

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

Issue Details

Rename the field to rows_.

Also updated some bounds checks to use mono_metadata_table_bounds_check (which
is metadata-update aware) where the subsequent lookups go through the metadata
decode functions and should just work with metadata-update.

Added FIXME: metadata-update in cases where the table row size is assumed to be
fixed or is used as a sentinel value, or where the decoding may depend on
sorting properties that metadata updates probably won't uphold.

Contributes to #44806

Author: lambdageek
Assignees: -
Labels:

area-VM-meta-mono

Milestone: -

@CoffeeFlux
Copy link
Contributor

Think you need to rebase this.

@lambdageek lambdageek force-pushed the delta-getter-table-rows branch 3 times, most recently from 5b43d2d to ed58d86 Compare March 17, 2021 23:58
Rename the field to rows_.

Also updated some bounds checks to use mono_metadata_table_bounds_check (which
is metadata-update aware) where the subsequent lookups go through the metadata
decode functions and should just work with metadata-update.

Added FIXME: metadata-update in cases where the table row size is assumed to be
fixed or is used as a sentinel value, or where the decoding may depend on
sorting properties that metadata updates probably won't uphold.
@lambdageek lambdageek force-pushed the delta-getter-table-rows branch from ed58d86 to f22794c Compare March 18, 2021 19:59
@marek-safar
Copy link
Contributor

@vargaz could you please review the change?

Copy link
Member

@thaystg thaystg left a comment

Choose a reason for hiding this comment

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

LGTM.

@lambdageek lambdageek merged commit dc5c909 into dotnet:main Mar 23, 2021
@uweigand
Copy link
Contributor

Hi @lambdageek, I think this patch introduced a regression here https://github.com/dotnet/runtime/pull/49738/files#diff-9bd9d0e46241d07dc62110246c89c9f056333eff4b0b089551780a625c871d0dL1982:

This used to set param_last to the number of rows of the PARAMS table, but now it sets it to the number of rows in the METHOD table, which looks incorrect, and does in fact cause assertion failures in the roslyn test suite for me:

* Assertion at /home/vol2/runtimelab/src/mono/mono/metadata/metadata.c:1535, condition `idx < table_info_get_rows (t)' not met

@lambdageek
Copy link
Member Author

Thanks @uweigand!

@ghost ghost locked as resolved and limited conversation to collaborators May 14, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
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.

6 participants