[coreclr] Make sure native string resource array(s) are sorted#122441
[coreclr] Make sure native string resource array(s) are sorted#122441radekdoulik merged 2 commits intodotnet:mainfrom
Conversation
So that binary search works properly. This updates bash script with similar change as dotnet#122403 did for powershell script.
|
Tagging subscribers to this area: @dotnet/area-system-resources |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the bash script that generates native string resource arrays for CoreCLR by ensuring the resource entries are sorted numerically by ID. Without sorting, binary search operations performed by bsearch() in LoadNativeStringResource() will not work correctly.
Key changes:
- Modified the bash script to sort resource array keys numerically before generating output, matching the existing PowerShell script behavior
|
The bash change is not needed, it generates things sorted already. |
|
The order is not guaranteed AFAIK. https://www.gnu.org/software/bash/manual/html_node/Arrays.html doesn't specify it, so I think it is implementation specific. |
|
Hmm, we never had an issue with that on any Unix OS. Ok, the added sort doesn't hurt. |
|
/ba-g the failing test is timeout, the hidden one is unrelated (failing on windows) |
So that binary search works properly.
This updates bash script with similar change as
#122403 did for powershell script.