Skip to content

Magic strings compare #123

Description

@AleXKarasev

Dear all,

when we enabled ICU for our applications, we had a problem with our CI (testhost.exe process was crashed). After deep investigation, we have found that it is not related to our software and problem could be reproduced with simple application.

Steps to reproduce:
add to project file

<ItemGroup>
  <PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
  <RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" />
</ItemGroup>

and add to execution code

var locale = CultureInfo.InvariantCulture;
locale.CompareInfo.Compare("Table1", "NewDataSet1", CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth);

We are able to reproduce it not on all Windows systems. Even more for some machine it works before without issue and after some updates were installed it crashed now.

image

We have to created 2 simple application: WPF and Console, and it is reproducible on both of them.
Please find source code here:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions