-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Set callconv in unicodedata callback and update doc #103852
Set callconv in unicodedata callback and update doc #103852
Conversation
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
f118d9e
to
0b054b2
Compare
Is this something we want? The functions in corehost are used for parsing arguments, environment variables, path and runtimeconfig. Does any of these has normalization of non-ASCII text? |
I had this on my radar for a while #44466 (comment). Now that we have minipal, we can use shared implementation without much of a hassle. |
@am11 could you please measure the impact of this change to the size of the apphost executable? We don't really care about size of |
It increases the size of apphost by 16.6 KB on osx-arm64 (before: 125328, after: 141936 in bytes). If this is unacceptable. I can drop the corehost changes from the PR and keep the others (doc update and win32 build fixes of unicodedata). |
Does this fix a bug in any observable behavior? As far as I can tell, all places that use |
@jkotas in the linked issue, it was found when runtime was cloned at non-ASCII path and host was trying to compare lowered hostfxr path with the lowered path returned on managed side in unit tests. Other than that, nethost uses it during the arg parsing (which we should anyway avoid). I’ll drop it and repurpose the PR. |
b1fdd84
to
f6e192a
Compare
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.
Thanks
toupper/lower in C++ only transforms the case of ASCII characters. It's different than what we expect in coreclr-pal and generally in C#. This change switches to minpal's toupper/lower which takes care of chars with opposite case in 0..0xFFFF range.Repurposed: set callconv for x86 and update docs.