Skip to content

[custom_attrs] Fix incorrect refactoring #51275

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
1 commit merged into from
Apr 15, 2021
Merged

Conversation

lambdageek
Copy link
Member

In
https://github.com/dotnet/runtime/pull/49738/files#diff-9bd9d0e46241d07dc62110246c89c9f056333eff4b0b089551780a625c871d0dL1982

When the code changed from acessing ca->rows directly, to using
table_info_get_rows, the "then" branch here was changed incorrectly.

The old code was

if (method_index == ca->rows) {
		ca = &image->tables [MONO_TABLE_PARAM];
		param_last = ca->rows + 1;

So param_last should be set to one past the last row of
MONO_TABLE_PARAM, not one past the number of rows in MONO_TABLE_METHOD (ca)

@ghost
Copy link

ghost commented Apr 14, 2021

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

Issue Details

In
https://github.com/dotnet/runtime/pull/49738/files#diff-9bd9d0e46241d07dc62110246c89c9f056333eff4b0b089551780a625c871d0dL1982

When the code changed from acessing ca->rows directly, to using
table_info_get_rows, the "then" branch here was changed incorrectly.

The old code was

if (method_index == ca->rows) {
		ca = &image->tables [MONO_TABLE_PARAM];
		param_last = ca->rows + 1;

So param_last should be set to one past the last row of
MONO_TABLE_PARAM, not one past the number of rows in MONO_TABLE_METHOD (ca)

Author: lambdageek
Assignees: -
Labels:

area-VM-meta-mono

Milestone: -

@lambdageek
Copy link
Member Author

Spotted by @uweigand #49738 (comment) Thanks!

In
https://github.com/dotnet/runtime/pull/49738/files#diff-9bd9d0e46241d07dc62110246c89c9f056333eff4b0b089551780a625c871d0dL1982

When the code changed from acessing ca->rows directly, to using
table_info_get_rows, the "then" branch here was changed incorrectly.

The old code was

```c
if (method_index == ca->rows) {
		ca = &image->tables [MONO_TABLE_PARAM];
		param_last = ca->rows + 1;
```

So `param_last` should be set to one past the last row of
MONO_TABLE_PARAM, not one past the number of rows in MONO_TABLE_METHOD (ca)
@ghost
Copy link

ghost commented Apr 15, 2021

Hello @lambdageek!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit d184a2e into dotnet:main Apr 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
This pull request was closed.
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.

3 participants