-
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
Fix GetNormalizedLength on iOS and similar platforms #110723
Conversation
/azp run runtime-androidemulator |
Azure Pipelines successfully started running 1 pipeline(s). |
Note: If #110725 gets merged in the meantime the tests should be reenabled |
could someone paste the failure logs for the failures listed in https://dev.azure.com/dnceng-public/public/_build/results?buildId=895827&view=logs&j=a2a39d6b-70c5-5040-933a-4b8b6e52bf19&t=278c4d44-b3fb-5bc8-7d46-7d739aeb5a1f? I don't know how to reach these logs. |
|
@matouskozak thanks for pasting the logs. Did this failure occur before? Looks like it is different than what used to fail. Also, it looks like iOS legs succeeded. So, the failures are localized to |
On rolling builds, I see failing
I don't see iOS pipeline running on this PR. The only run iOS job is the one that is part of regular runtime pipeline which only runs smoke tests. I'll try to kick them off. I don't think we will see difference in failing tests between let's say iOS and MacCatalyst or tvOS. |
/azp run runtime-ioslike,runtime-ioslikesimulator |
Azure Pipelines successfully started running 2 pipeline(s). |
Btw. this is the way I'm getting the logs out (I know it's not great, we need to improve it dotnet/xharness#1188) |
@tarekgh something is going on with the CI tests that I don't understand. Looks like everything else but maccatalyst is passing. However, when I try it locally even the other platforms are failing for me. I'm investigating. |
@tarekgh I haven't figured out the CI issue but I think that I know what's wrong with the tests currently. The Apple-mobile string normalize API is returning 0 when the normalization fails (which it should fail since we are trying to normalize into too small buffer)
But runtime/src/libraries/System.Private.CoreLib/src/System/Globalization/Normalization.Icu.cs Lines 156 to 160 in e78ee77
Do you know what does |
When there is not enough buffer space, we return the returned length from
You can see how it is used here: runtime/src/libraries/System.Private.CoreLib/src/System/Globalization/Normalization.Icu.cs Line 85 in e654570
Will you continue looking at fixing this? or do you need any help from me? |
Thank you. I can take over, enjoy the vacation. |
of normalized string instead of 0 for insufficiently sized buffers
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
Azure Pipelines successfully started running 3 pipeline(s). |
if (lpDst == NULL || cwDstLength == 0) | ||
{ | ||
return (int32_t)[normalizedString length]; | ||
} |
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.
I think this part is no longer necessary, but I prefer to keep it so that it is clear what happens when destination buffer is 0.
@tarekgh I fixed the error handling so that it is aligned with the |
@matouskozak thanks. |
@akoeplinger @ivanpovazan @matouskozak could one of you please help approving this PR if there is no more feedback? Thanks! |
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.
LGTM
Fixes #110720