From f97d1f09ab5395dbe12f98e935cd29108b5ba07d Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Wed, 18 Apr 2018 09:03:42 +0000 Subject: [PATCH] ICU-13634 Fixing cintltst sementation fault: reset UInitOnce mechanisms in number code after u_cleanup. X-SVN-Rev: 41242 --- icu4c/source/common/numparse_unisets.cpp | 1 + icu4c/source/i18n/number_modifiers.cpp | 1 + icu4c/source/i18n/number_skeletons.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/icu4c/source/common/numparse_unisets.cpp b/icu4c/source/common/numparse_unisets.cpp index 3aa5b5b1e5c..1c328d93990 100644 --- a/icu4c/source/common/numparse_unisets.cpp +++ b/icu4c/source/common/numparse_unisets.cpp @@ -108,6 +108,7 @@ UBool U_CALLCONV cleanupNumberParseUniSets() { delete gUnicodeSets[i]; gUnicodeSets[i] = nullptr; } + gNumberParseUniSetsInitOnce.reset(); return TRUE; } diff --git a/icu4c/source/i18n/number_modifiers.cpp b/icu4c/source/i18n/number_modifiers.cpp index 872b97010d7..13a86ebeff9 100644 --- a/icu4c/source/i18n/number_modifiers.cpp +++ b/icu4c/source/i18n/number_modifiers.cpp @@ -32,6 +32,7 @@ UBool U_CALLCONV cleanupDefaultCurrencySpacing() { UNISET_DIGIT = nullptr; delete UNISET_NOTS; UNISET_NOTS = nullptr; + gDefaultCurrencySpacingInitOnce.reset(); return TRUE; } diff --git a/icu4c/source/i18n/number_skeletons.cpp b/icu4c/source/i18n/number_skeletons.cpp index ed97025b3a3..d921b547e13 100644 --- a/icu4c/source/i18n/number_skeletons.cpp +++ b/icu4c/source/i18n/number_skeletons.cpp @@ -34,6 +34,7 @@ char16_t* kSerializedStemTrie = nullptr; UBool U_CALLCONV cleanupNumberSkeletons() { uprv_free(kSerializedStemTrie); kSerializedStemTrie = nullptr; + gNumberSkeletonsInitOnce.reset(); return TRUE; } -- 2.40.0