Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

[RyuJIT/ARM32] Localization problem #4640

@BredPet

Description

@BredPet

Hi, when I try to compile and run HelloWorld sample under Tizen ARM, I get the follow issue:

#0  0x00000000 in ?? ()
#1  0x0017513a in GlobalizationNative_GetDefaultLocaleName (value=0x509810, valueLength=157) at /opt/code/src/corefx/System.Globalization.Native/locale.cpp:228
#2  0x001cc17e in S_P_CoreLib_Interop_GlobalizationInterop__GetDefaultLocaleName () at CoreRT/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs:173
#3  0x001b5610 in S_P_CoreLib_System_Globalization_CultureData__GetDefaultLocaleName () at CoreRT/src/System.Private.CoreLib/shared/System/Globalization/CultureData.Unix.cs:111
#4  0x001a9e4e in S_P_CoreLib_System_Globalization_CultureInfo__GetUserDefaultCulture () at CoreRT/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.Unix.cs:18
#5  0x00197f9e in S_P_CoreLib_System_Globalization_CultureInfo__Init () at CoreRT/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs:159
#6  0x001a291c in S_P_CoreLib_System_Globalization_CultureInfo___cctor () at CoreRT/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs:149
#7  0x001933c0 in S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__Call<Int32> () at CoreRT/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.NonPortable.cs:35
#8  0x001853e8 in S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__EnsureClassConstructorRun () at CoreRT/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs:97
#9  0x00183c16 in S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__CheckStaticClassConstructionReturnGCStaticBase () at CoreRT/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs:43
#10 0x0018ff82 in S_P_CoreLib_System_Globalization_CultureInfo__get_InvariantCulture () at CoreRT/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs:602
#11 0x001da91a in System_Runtime_Extensions_System_IO_TextWriter_NullTextWriter___ctor () at /root/corefx-939093/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs:574
#12 0x001d2d66 in System_Runtime_Extensions_System_IO_TextWriter___cctor () at /root/corefx-939093/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs:21
#13 0x001933c0 in S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__Call<Int32> () at CoreRT/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.NonPortable.cs:35
#14 0x001853e8 in S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__EnsureClassConstructorRun () at CoreRT/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs:97
#15 0x00183c16 in S_P_CoreLib_System_Runtime_CompilerServices_ClassConstructorRunner__CheckStaticClassConstructionReturnGCStaticBase () at CoreRT/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs:43
#16 0x001da3ac in System_Runtime_Extensions_System_IO_TextWriter___ctor_0 () at /root/corefx-939093/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs:33
#17 0x001d299e in System_Runtime_Extensions_System_IO_StreamWriter___ctor_3 () at /root/corefx-939093/src/System.Runtime.Extensions/src/System/IO/StreamWriter.cs:94
#18 0x001b0082 in System_Console_System_Console__CreateOutputWriter () at /root/corefx-939093/src/System.Console/src/System/Console.cs:120
#19 0x001ad1b6 in System_Console_System_Console___c___get_Out_b__25_0 () at /root/corefx-939093/src/System.Console/src/System/Console.cs:114
#20 0x001d35b2 in S_P_CoreLib_System_Threading_LazyInitializer__EnsureInitializedCore_3<System___Canon> () at CoreRT/src/System.Private.CoreLib/shared/System/Threading/LazyInitializer.cs:266
#21 0x001c12dc in S_P_CoreLib_System_Threading_LazyInitializer__EnsureInitialized_3<System___Canon> () at CoreRT/src/System.Private.CoreLib/shared/System/Threading/LazyInitializer.cs:245
#22 0x001b04ba in System_Console_System_Console__EnsureInitialized<System___Canon> () at /root/corefx-939093/src/System.Console/src/System/Console.cs:29
#23 0x001950d4 in System_Console_System_Console__get_Out () at /root/corefx-939093/src/System.Console/src/System/Console.cs:114
#24 0x0019435c in System_Console_System_Console__WriteLine_12 () at /root/corefx-939093/src/System.Console/src/System/Console.cs:560
#25 0x00184e50 in Hello_Hello_Program__Main () at CoreRT/src/System.Private.CoreLib/src/Internal/Runtime/Augments/EnvironmentAugments.cs:127
#26 0x00183bc8 in Hello__Module___MainMethodWrapper () at <stdin>:16707566
#27 0x0017b44a in Hello__Module___StartupCodeMain () at <stdin>:16707566
#28 0x00020708 in main (argc=1, argv=0xbefffe14) at CoreRT/src/Native/Bootstrap/main.cpp:332

This is because the CoreCRL doesn't initialize the non-invariant mode with ICU. When I try to call GlobalizationNative_LoadICU() from GlobalizationNative_GetDefaultLocaleName in CoreCLR it's working. As I see CoreCLR uses invariant mode by default. But CoreRT - is not. How can I fix this? Maybe I should add ICU initialization from CoreCLR to CoreRT?

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