Uh oh!
There was an error while loading. Please reload this page.
[release/7.0][mono] Use unsigned char when computing UTF8 string hashes - #83302
Conversation
lambdageek
commented
Mar 11, 2023
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/4392646513 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
7bc56e9 to
5dada63Comparelambdageek
commented
Mar 13, 2023
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/4406095701 |
5dada63 to
e895dbbComparelambdageek
commented
Mar 13, 2023
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/4407943691 |
carlossanlop
commented
Mar 13, 2023
Hey @lambdageek - Are you intending to get this approved for the April servicing release? Code-complete is today. |
lambdageek
commented
Mar 13, 2023
@carlossanlop I don't think we'll make it. Let's try for the next one |
The C standard does not specify whether `char` is signed or unsigned, it is implementation defined. Apparently Android aarch64 makes a different choice than other platforms (at least macOS arm64 and Windows x64 give different results). Mono uses `mono_metadata_str_hash` in the AOT compiler and AOT runtime to optimize class name lookup. As a result, classes whose names include UTF-8 continuation bytes (with the high bit = 1) will hash differently in the AOT compiler and on the device. Fixesdotnet#82187Fixesdotnet#78638
e895dbb to
064e69dComparelambdageek
commented
Mar 14, 2023
lambdageek
commented
Mar 28, 2023
carlossanlop
commented
Mar 28, 2023
I'm retargeting this PR to the new Repo maintainers will now be allowed to merge their own servicing PR as long as it meets the requirements:
The new process is described here: runtime/docs/project/library-servicing.md. The infra team will be actively monitoring servicing PRs to ensure all requirements are met and to help with any issues. Let me know if you have any questions. |
carlossanlop
commented
Mar 28, 2023
I see you already retargeted it, @lambdageek. You're awesome. |
Backport of #83273 to release/7.0
Resolves#82187
Resolves#78638
The corresponding 6.0 PR is #83303
Customer Impact
Resolves crashes in Release builds of Android apps that include classes with non-ASCII names that use AOT compilation.
Testing
Manual testing. New regression test.
Risk
Low. For code that uses ASCII names the hash code computation is unchanged.