-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix incorrect conversion from int to size_t triggered by PR 66552. #66721
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
Fix incorrect conversion from int to size_t triggered by PR 66552. #66721
Conversation
|
/azp run runtime-wasm |
44fa240 to
913bef4
Compare
dotnet#66552 did incorrect switch to size_t from int in a sections that expects variable to go negative.
913bef4 to
8c3c2c1
Compare
|
Found more instance with similar sign issue, added fix into this PR. |
|
Comment was made before the most recent commit for PR 66721 in repo dotnet/runtime |
|
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. |
|
/azp run runtime-wasm |
| for (int i = ((int)nhandles - 1); i >= 0; i--) { | ||
| if (!handles_data [i]) | ||
| continue; | ||
| mono_w32handle_unlock (handles_data [i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can keep gsize here like this.
| for (int i = ((int)nhandles - 1); i >= 0; i--) { | |
| if (!handles_data [i]) | |
| continue; | |
| mono_w32handle_unlock (handles_data [i]); | |
| for (gsize i = nhandles; i > 0; i--) { | |
| if (!handles_data [i - 1]) | |
| continue; | |
| mono_w32handle_unlock (handles_data [i - 1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just restored old behavior, you could argue if it should be reverse at all, also discovered that this function is not even called, so occurs to be dead code. Will remove complete instance in a different PR, but lets this one stay for now so tests can run and we can unblock the issues the other fixes in this PR should resolve.
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The wasm Windows builds on runtime-staging are green again now, merging to unblock CI. |
…66721) dotnet#66552 did incorrect switch to size_t from int in a sections that expects variable to go negative.
#66552 did an incorrect switch to size_t from int in a section that expects variable to go negative.