Skip to content

Conversation

@daniel-ju
Copy link
Contributor

These changes remove all of the MSVC W3 warnings and most of the W4 warnings in the common and i18n projects.

@CLAassistant
Copy link

CLAassistant commented Jul 23, 2018

CLA assistant check
All committers have signed the CLA.

srl295
srl295 previously approved these changes Jul 23, 2018
Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of great work here! looks good to me ..

I assume the renaming was to avoid name collisions of some sort?

@srl295
Copy link
Member

srl295 commented Jul 23, 2018

also: exhaustive and memory (valgrind type) tests might be good to do on this, after or perhaps before landing.

@daniel-ju
Copy link
Contributor Author

Yes, all of the variable renaming was to avoid hiding class members or previously initialized variables of the same name.

jefgen
jefgen previously approved these changes Jul 23, 2018
Copy link
Member

@jefgen jefgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all this work on warning clean-up!

@jefgen
Copy link
Member

jefgen commented Jul 23, 2018

We will need to have a JIRA issue for the pull-request on GitHub.
However, I can help you to create a JIRA issue for these changes @daniel-ju , and/or help you to create an account so that you can file the issue directly if you want to.

@srl295
Copy link
Member

srl295 commented Jul 23, 2018

@jefgen
Copy link
Member

jefgen commented Jul 23, 2018

Thanks @srl295 !
Yes, we could likely use ICU-13764 and/or ICU-13214 (since I think 13214) would actually be fixed by this change. :)
The other issues I'm not as sure about as some are for msys/cygwin and some would require modifying the *.vcxproj files -- which isn't in this set of changes.

@axelandrejs
Copy link

If this fixes all the W3 warnings, can we turn on W3 in the official project? Or going a step further, can we turn on W4 and suppress the specific warnings that are still being hit?

@jefgen
Copy link
Member

jefgen commented Jul 24, 2018

@axelandrejs Unfortunately, no this doesn't address all of the warnings that are produced in the build by the VSTS build bots -- though it does go a long way to addressing many of them.
The warning level is currently set to W3 in the "common" and "i18n" projects, but warnings are not treated as errors in the build system.

There is a task (currently asigned to me) for setting up parallel build bots that do indeed treat warnings as errors (Link: https://unicode-org.atlassian.net/browse/ICU-13764 ). However, my thinking is that it would need to be done on a project-by-project basis, as otherwise nothing would ever build and it would forever be red.

@srl295
Copy link
Member

srl295 commented Jul 24, 2018

Yes, we could likely use ICU-13764 and/or ICU-13214 (since I think 13214) would actually be fixed by this change. :)

please update the PR title

@jefgen
Copy link
Member

jefgen commented Jul 24, 2018

@srl295 Daniel filed a new issue/ticket for this, ICU-20043, so I think I we would want to update the title to be something like:
"ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup"

@axelandrejs
Copy link

Below are the warnings I see in our VSTS build. If any of those are not addressed, can we suppress those and then turn warnings into errors? Warnings have a long history of getting ignored:)

icu4c\source\common\uloc_keytype.cpp(231,0): Warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data
icu4c\source\common\uloc_keytype.cpp(323,0): Warning C4267: 'initializing': conversion from 'size_t' to 'int32_t', possible loss of data
icu4c\source\common\rbbi.cpp(631,0): Warning C4244: 'initializing': conversion from 'int64_t' to 'int32_t', possible loss of data
icu4c\source\common\rbbi.cpp(658,0): Warning C4244: 'initializing': conversion from 'int64_t' to 'int32_t', possible loss of data
icu4c\source\common\uhash.cpp(863,0): Warning C4267: 'argument': conversion from 'size_t' to 'int32_t', possible loss of data
icu4c\source\common\uhash.cpp(869,0): Warning C4267: 'argument': conversion from 'size_t' to 'int32_t', possible loss of data
icu4c\source\common\wintz.cpp(383,0): Warning C4267: '=': conversion from 'size_t' to 'int32_t', possible loss of data
icu4c\source\common\ucnv_ct.cpp(183,0): Warning C4244: 'initializing': conversion from '__int64' to 'int32_t', possible loss of data

if(start > end) { return primary; }
}
modified = TRUE;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniel-ju Removing this seems a bit odd, as the method is named "set*" and it does look like this method can mutate the object.
What was the warning for this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning was that the line was unreachable because of returning in the infinite for loop a few lines before this. Should we instead move this line before the loop in the else condition?

Copy link
Member

@jefgen jefgen Aug 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good question. I'm not entirely sure. It feels like perhaps the intent was for the modified to always be set if the code goes down the else path -- but I'm not sure.

I think it might be better to omit this change from the warning clean-up effort, and then file a separate ticket/issue just for this specific case. (As I'm not sure what the implications of the change would be).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revert this change and file a separate ticket for it.

@jefgen
Copy link
Member

jefgen commented Aug 9, 2018

@daniel-ju Thank you for fixing the member variable naming! 👍

if ( fCapitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE) ) {
UErrorCode status = U_ZERO_ERROR;
fCapitalizationBrkIter = BreakIterator::createSentenceInstance(fLocale, status);
Copy link
Member

@jefgen jefgen Aug 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one, I wonder if it might be better to use the status parameter that is passed in from the caller instead.
The reason is that createSentenceInstance could fail due to Out-Of-Memory (OOM), and the U_MEMORY_ALLOCATION_ERROR error would be hidden, and the caller would have no idea that an OOM error happened. :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jeff, that's a good point.

// appropriate for the requested daylight value.
if ((daylight && timeType == UTZFMT_TIME_TYPE_STANDARD) || (!daylight && timeType == UTZFMT_TIME_TYPE_DAYLIGHT)) {
if (&timeType != NULL && ((daylight && timeType == UTZFMT_TIME_TYPE_STANDARD) || (!daylight && timeType == UTZFMT_TIME_TYPE_DAYLIGHT))) {
offset = daylight ? getRawOffset() + getDSTSavings() : getRawOffset();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it better to initialize timeType to UTZFMT_TIME_TYPE_UNKNOWN?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that seems like a cleaner way to fix this, thanks!

return FALSE;
}
U_ASSERT(FALSE);

Copy link
Member

@jefgen jefgen Aug 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More of a broader question: But I wonder if maybe ICU needs an UNREACHABLE macro perhaps?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. This question has been brought up before but I don't think much came of it. Can we add it right now? Just go add a macro called U_UNREACHABLE or UPRV_UNREACHABLE in a file like platform.h.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Shane. I wonder if it might be better to have it be private (aka UPRV_), at least at first?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! I'm going to file another ticket for this because this PR is quite large as it is. There also might be implications from adding a new private macro to the public header platform.h.

UErrorCode status = U_ZERO_ERROR;
fCapitalizationBrkIter = BreakIterator::createSentenceInstance(fLocale, status);
if (U_FAILURE(status)) {
UErrorCode status2 = U_ZERO_ERROR;
Copy link
Member

@jefgen jefgen Aug 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue with possible U_MEMORY_ALLOCATION_ERROR errors being silently ignored. I think it would be better to use the status parameter from the caller.

UErrorCode status = U_ZERO_ERROR;
ICUServiceKey* fallbackKey = createKey(&id, status);
UErrorCode fallbackStatus = U_ZERO_ERROR;
ICUServiceKey* fallbackKey = createKey(&id, fallbackStatus);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that this is actually another place were an OOM error might happen. The call to createKey will eventually try to allocate memory, and could possibly fail. If it does fail then a NULL/nullptr might be returned, and then ICU would likely/possibly crash on the following line when it tries to call the fallback() method on the null pointer.
In addition to the warning fix of changing the name to fallbackStatus, I think it would be best if we also check for a NULL/nullptr being returned, and not enter the while loop if it is NULL. :)

return FALSE;
}
U_ASSERT(FALSE);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Shane. I wonder if it might be better to have it be private (aka UPRV_), at least at first?

#ifdef RBBI_DEBUG
if (gTrace) {
RBBIDebugPrintf(" %4ld ", utext_getNativeIndex(&fText));
RBBIDebugPrintf(" %lld ", utext_getNativeIndex(&fText));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you removed the 4? I wonder if this should likely be "%4lld" instead.
(Removing the 4 means that smaller number [ex: 1] will no longer be padded with blanks/spaces.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, I'll add the 4 back, thanks!

return true;
}
uint16_t table_base = 0;
uint16_t table_dupl = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you moved these two variables down, and gave them "default" values because the compiler warning was that if numStates is zero, then the if statement below might be comparing uninitialized memory right?
But it seems you gave them different values so as to prevent it returning true (that it contains duplicates) in the case with a zero size. I think it might be worth adding a comment about the reason why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, I'll add a comment explaining that.

UErrorCode status = U_ZERO_ERROR;
capitalizationBrkIter = BreakIterator::createSentenceInstance(locale, status);
if (U_FAILURE(status)) {
UErrorCode status2 = U_ZERO_ERROR;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the other cases, this could also potentially fail due to an OOM error. I think it might also be better to reuse the existing status parameter from the caller.

@daniel-ju
Copy link
Contributor Author

Thanks @jefgen for the review! 😄

@daniel-ju daniel-ju merged commit 5bca8f1 into unicode-org:master Aug 10, 2018
@jefgen
Copy link
Member

jefgen commented Aug 11, 2018

Ah, it seems you merged the pull request by simply hitting the "big green button" on GitHub without changing the Pull Request title, or selecting a "Squash Merge".
Unfortunately, a "revert" of this pull request would create yet more commits in the repo, so I'm not sure if that would be the way to go.
The 'master' branch also has "force" pushes disabled as well -- so I don't know if much can be done to clean this up. :|

@daniel-ju
Copy link
Contributor Author

Ah I’m sorry for making a mess by not squashing my commits. I’ll be sure not to make this mistake in the future.

@jefgen
Copy link
Member

jefgen commented Aug 11, 2018

Okay, I think I will temporarily disable the branch protection on 'master' so that I can force push to clean things up.

@jefgen
Copy link
Member

jefgen commented Aug 11, 2018

Alright, here is what I did:

  • Disabled branch protection on "master".
  • Force pushed to the commit just before this PR was merged.
  • Re-enabled the branch protection on "master".

This means that the master branch is now cleaned-up, but the status on this Pull-Request is confused. (GitHub thinks that it was merged, but in reality it was not.) I will update the title to say that it was essentially abandoned.

Please open up a new pull-request (from your fork) and then we can do a squash-merge and set the PR title appropriately. (Sorry for all the hassle...)

@jefgen jefgen changed the title ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup (abandoned)ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup Aug 11, 2018
@jefgen jefgen changed the title (abandoned)ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup (abandoned) ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup Aug 11, 2018
@daniel-ju
Copy link
Contributor Author

Ok, thanks Jeff. Sorry for the trouble!

hugovdm pushed a commit to hugovdm/icu that referenced this pull request Feb 25, 2020
ICU-20568 add unitPreferenceData to units.txt via ldml2icu rules.
hugovdm added a commit to hugovdm/icu that referenced this pull request Mar 27, 2020
Fix for base unit complexity != 1. Eg: volume -> cubic-meter.
hugovdm added a commit to hugovdm/icu that referenced this pull request Jul 21, 2020
Fix MeasureUnit identifiers to be spec-compliant.
GerHobbelt pushed a commit to GerHobbelt/icu that referenced this pull request Mar 11, 2024
Adds the necessary code files for collation to our ICU build, responsible for ensuring "unicode-org#11" appears after "unicode-org#2" when sorted.

Adds the necessary data files for en_us_posix collation.

Size changes listed in PR.
sven-oly pushed a commit to sven-oly/icu that referenced this pull request Sep 18, 2024
sven-oly pushed a commit that referenced this pull request Sep 18, 2024
ctrlaltf24 pushed a commit to FaithLife-Community/icu that referenced this pull request Oct 23, 2024
…ine, and clean-up (unicode-org#18)

This change refactors the Nuget build pipeline for the MS-ICU Nuget package.

This changes the Nuget build pipeline to enable code-signing, and also allows
for running the pipeline in two different modes: "Code signing enabled" and
"No code signing enabled".

This allows for running the Nuget pipeline as a "CI check" on PRs, in order to
ensure that any changes don't accidentally break things for the Nuget package.
With this change we can now switch over to use this new YAML-based Nuget
build pipeline configuration instead of the legacy "classic" ADO build pipeline
configuration.

Furthermore, since the Nuget pipeline is now checked-in to the repo, it means
that anyone can edit the configuration (ie: to add a new platform). Whereas
before it was only in MSCodeHub, and was not accessible at all.

Also, the guidance from discussion with the PackageES team is that the
ComponentGovernance task must be after all of the various build task(s) are
done (that produces binaries).

This change also makes a few other changes to pipeline as well:
- The contents of the build artifacts that are published across stages is reduced.
- PackageES tasks are all skipped in the Non-code sign mode, in order to speed
things up.
- The non-signed Nuget package is published as a build artifact in order to allow
testing/inspection of changes.
- The non-signed Nuget package uses -prerelease as a suffix along with the
monotonic increasing build number.
- Removes the two PowerShell scripts that were used to set variables in the build
 pipeline, as we can do this directly in the YAML file now.
thevar1able added a commit to ClickHouse/icu that referenced this pull request Nov 17, 2025
Uninitialized bytes in strlen at offset 0 inside [0x70e002cd131d, 1)
==1637==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55a1c49b5e38 in unsigned long std::__1::__constexpr_strlen[abi:ne210105]<char>(char const*) ci/tmp/build/./contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h:63:10
    #1 0x55a1c49b5e38 in std::__1::char_traits<char>::length[abi:ne210105](char const*) ci/tmp/build/./contrib/llvm-project/libcxx/include/__string/char_traits.h:130:12
    unicode-org#2 0x55a1c49b5e38 in unsigned long std::__1::__char_traits_length_checked[abi:ne210105]<std::__1::char_traits<char>>(std::__1::char_traits<char>::char_type const*) ci/tmp/build/./contrib/llvm-project/libcxx/include/string_view:277:10
    unicode-org#3 0x55a1c49b5e38 in std::__1::basic_string_view<char, std::__1::char_traits<char>>::basic_string_view[abi:ne210105](char const*) ci/tmp/build/./contrib/llvm-project/libcxx/include/string_view:356:31
    unicode-org#4 0x55a1c49b5e38 in icu_78::Locale::Nest::Nest(icu_78::Locale::Heap&&, unsigned char) ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:275:32
    unicode-org#5 0x55a1c49bf516 in icu_78::Locale::Nest& icu_78::Locale::Payload::emplace<icu_78::Locale::Nest, icu_78::Locale::Heap, unsigned char>(icu_78::Locale::Heap&&, unsigned char&&) ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:434:23
    unicode-org#6 0x55a1c49bf516 in icu_78::Locale::setKeywordValue(icu_78::StringPiece, icu_78::StringPiece, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:2799:33
    unicode-org#7 0x55a1c4996b63 in icu_78::Locale::setKeywordValue(char const*, char const*, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/common/unicode/locid.h:745:9
    unicode-org#8 0x55a1c4998a8b in icu_78::CollationLoader::loadFromData(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:452:25
    unicode-org#9 0x55a1c4995fcc in icu_78::CollationLoader::createCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:233:16
    unicode-org#10 0x55a1c4995fcc in icu_78::LocaleCacheKey<icu_78::CollationCacheEntry>::createObject(void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:144:20
    unicode-org#11 0x55a1c4b023e3 in icu_78::UnifiedCache::_get(icu_78::CacheKeyBase const&, icu_78::SharedObject const*&, void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.cpp:394:17
    unicode-org#12 0x55a1c49963c7 in void icu_78::UnifiedCache::get<icu_78::CollationCacheEntry>(icu_78::CacheKey<icu_78::CollationCacheEntry> const&, void const*, icu_78::CollationCacheEntry const*&, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.h:234:8
    unicode-org#13 0x55a1c49963c7 in icu_78::CollationLoader::getCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:477:12
    unicode-org#14 0x55a1c499800b in icu_78::CollationLoader::loadFromCollations(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:383:44
    unicode-org#15 0x55a1c4995fea in icu_78::CollationLoader::createCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:231:16
    unicode-org#16 0x55a1c4995fea in icu_78::LocaleCacheKey<icu_78::CollationCacheEntry>::createObject(void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:144:20
    unicode-org#17 0x55a1c4b023e3 in icu_78::UnifiedCache::_get(icu_78::CacheKeyBase const&, icu_78::SharedObject const*&, void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.cpp:394:17
    unicode-org#18 0x55a1c49963c7 in void icu_78::UnifiedCache::get<icu_78::CollationCacheEntry>(icu_78::CacheKey<icu_78::CollationCacheEntry> const&, void const*, icu_78::CollationCacheEntry const*&, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.h:234:8
    unicode-org#19 0x55a1c49963c7 in icu_78::CollationLoader::getCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:477:12
    unicode-org#20 0x55a1c499776a in icu_78::CollationLoader::loadFromBundle(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:309:16
    unicode-org#21 0x55a1c4997005 in icu_78::CollationLoader::loadFromLocale(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:259:16
    unicode-org#22 0x55a1c4995fd6 in icu_78::CollationLoader::createCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:227:16
    unicode-org#23 0x55a1c4995fd6 in icu_78::LocaleCacheKey<icu_78::CollationCacheEntry>::createObject(void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:144:20
    unicode-org#24 0x55a1c4b023e3 in icu_78::UnifiedCache::_get(icu_78::CacheKeyBase const&, icu_78::SharedObject const*&, void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.cpp:394:17
    unicode-org#25 0x55a1c49963c7 in void icu_78::UnifiedCache::get<icu_78::CollationCacheEntry>(icu_78::CacheKey<icu_78::CollationCacheEntry> const&, void const*, icu_78::CollationCacheEntry const*&, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.h:234:8
    unicode-org#26 0x55a1c49963c7 in icu_78::CollationLoader::getCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:477:12
    unicode-org#27 0x55a1c4996164 in icu_78::CollationLoader::loadTailoring(icu_78::Locale const&, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:164:19
    unicode-org#28 0x55a1c498046c in icu_78::Collator::makeInstance(icu_78::Locale const&, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/coll.cpp:468:40
    unicode-org#29 0x55a1c498046c in icu_78::Collator::createInstance(icu_78::Locale const&, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/coll.cpp:449:16
    unicode-org#30 0x55a1c499945b in ucol_open_78 ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:523:22
    unicode-org#31 0x55a1ba651b3a in Collator::Collator(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) ci/tmp/build/./src/Columns/Collator.cpp:109:16
    unicode-org#32 0x55a1aba13000 in Collator* std::__1::construct_at[abi:ne210105]<Collator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, Collator*>(Collator*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/construct_at.h:38:49
    unicode-org#33 0x55a1aba13000 in Collator* std::__1::__construct_at[abi:ne210105]<Collator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, Collator*>(Collator*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/construct_at.h:46:10
    unicode-org#34 0x55a1aba13000 in void std::__1::allocator_traits<std::__1::allocator<Collator>>::construct[abi:ne210105]<Collator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, 0>(std::__1::allocator<Collator>&, Collator*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:302:5
    unicode-org#35 0x55a1aba13000 in std::__1::__shared_ptr_emplace<Collator, std::__1::allocator<Collator>>::__shared_ptr_emplace[abi:ne210105]<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::allocator<Collator>, 0>(std::__1::allocator<Collator>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:162:5
    unicode-org#36 0x55a1aba13000 in std::__1::shared_ptr<Collator> std::__1::allocate_shared[abi:ne210105]<Collator, std::__1::allocator<Collator>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, 0>(std::__1::allocator<Collator> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:736:51
    unicode-org#37 0x55a1aba13000 in std::__1::shared_ptr<Collator> std::__1::make_shared[abi:ne210105]<Collator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, 0>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:744:10
    unicode-org#38 0x55a1aba13000 in DB::(anonymous namespace)::QueryTreeBuilder::buildSortList(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:514:24
    unicode-org#39 0x55a1aba16771 in DB::(anonymous namespace)::QueryTreeBuilder::buildWindow(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:818:41
    unicode-org#40 0x55a1ab9f06ab in DB::(anonymous namespace)::QueryTreeBuilder::buildExpression(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:708:58
    unicode-org#41 0x55a1ab9eb13b in DB::(anonymous namespace)::QueryTreeBuilder::buildExpressionList(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:588:32
    unicode-org#42 0x55a1aba004f7 in DB::(anonymous namespace)::QueryTreeBuilder::buildSelectExpression(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:339:51
    unicode-org#43 0x55a1ab9e8ec9 in DB::(anonymous namespace)::QueryTreeBuilder::buildSelectOrUnionExpression(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:162:22
    unicode-org#44 0x55a1ab9f4620 in DB::(anonymous namespace)::QueryTreeBuilder::buildSelectWithUnionExpression(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:180:16
    unicode-org#45 0x55a1ab9e8bc1 in DB::(anonymous namespace)::QueryTreeBuilder::buildSelectOrUnionExpression(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) const ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:158:22
    unicode-org#46 0x55a1ab9e5a21 in DB::(anonymous namespace)::QueryTreeBuilder::buildQueryTreeNode(std::__1::shared_ptr<DB::IAST>, std::__1::shared_ptr<DB::Context const>) ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:140:27
    unicode-org#47 0x55a1ab9e5a21 in DB::buildQueryTree(std::__1::shared_ptr<DB::IAST>, std::__1::shared_ptr<DB::Context const>) ci/tmp/build/./src/Analyzer/QueryTreeBuilder.cpp:1161:20
    unicode-org#48 0x55a1aefdac0d in DB::buildQueryTreeAndRunPasses(std::__1::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::__1::shared_ptr<DB::Context const> const&, std::__1::shared_ptr<DB::IStorage> const&) ci/tmp/build/./src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:153:23
    unicode-org#49 0x55a1aefd3f6d in DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) ci/tmp/build/./src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:182:18
    unicode-org#50 0x55a1aefde9f1 in std::__1::unique_ptr<DB::InterpreterSelectQueryAnalyzer, std::__1::default_delete<DB::InterpreterSelectQueryAnalyzer>> std::__1::make_unique[abi:ne210105]<DB::InterpreterSelectQueryAnalyzer, std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&, 0>(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:759:30
    unicode-org#51 0x55a1aefde4d2 in DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0::operator()(DB::InterpreterFactory::Arguments const&) const ci/tmp/build/./src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:307:16
    unicode-org#52 0x55a1aefde4d2 in decltype(std::declval<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&>()(std::declval<DB::InterpreterFactory::Arguments const&>())) std::__1::__invoke[abi:ne210105]<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&>(DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:249:25
    unicode-org#53 0x55a1aefde4d2 in std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>> std::__1::__invoke_void_return_wrapper<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>>, false>::__call[abi:ne210105]<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&>(DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:334:12
    unicode-org#54 0x55a1aefde4d2 in std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>> std::__1::__invoke_r[abi:ne210105]<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>>, DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&>(DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:348:10
    unicode-org#55 0x55a1aefde4d2 in std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>> std::__1::__function::__policy_func<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>> (DB::InterpreterFactory::Arguments const&)>::__call_func[abi:ne210105]<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0>(std::__1::__function::__policy_storage const*, DB::InterpreterFactory::Arguments const&) ci/tmp/build/./contrib/llvm-project/libcxx/include/__functional/function.h:450:12
    unicode-org#56 0x55a1aee07b17 in std::__1::__function::__policy_func<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>> (DB::InterpreterFactory::Arguments const&)>::operator()[abi:ne210105](DB::InterpreterFactory::Arguments const&) const ci/tmp/build/./contrib/llvm-project/libcxx/include/__functional/function.h:508:12
    unicode-org#57 0x55a1aee07b17 in std::__1::function<std::__1::unique_ptr<DB::IInterpreter, std::__1::default_delete<DB::IInterpreter>> (DB::InterpreterFactory::Arguments const&)>::operator()(DB::InterpreterFactory::Arguments const&) const ci/tmp/build/./contrib/llvm-project/libcxx/include/__functional/function.h:772:10
    unicode-org#58 0x55a1aee07b17 in DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) ci/tmp/build/./src/Interpreters/InterpreterFactory.cpp:398:12
    unicode-org#59 0x55a1afc33e94 in DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::__1::unique_ptr<DB::ReadBuffer, std::__1::default_delete<DB::ReadBuffer>>&, std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::ImplicitTransactionControlExecutor>, std::__1::function<void ()>, DB::QueryResultDetails&) ci/tmp/build/./src/Interpreters/executeQuery.cpp:1545:66
    unicode-org#60 0x55a1afc24152 in DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) ci/tmp/build/./src/Interpreters/executeQuery.cpp:1833:11
    unicode-org#61 0x55a1befed98c in DB::TCPHandler::runImpl() ci/tmp/build/./src/Server/TCPHandler.cpp:765:68
    unicode-org#62 0x55a1bf06214d in DB::TCPHandler::run() ci/tmp/build/./src/Server/TCPHandler.cpp:2861:9
    unicode-org#63 0x55a1cc727d1f in Poco::Net::TCPServerConnection::start() ci/tmp/build/./base/poco/Net/src/TCPServerConnection.cpp:40:3
    unicode-org#64 0x55a1cc728d11 in Poco::Net::TCPServerDispatcher::run() ci/tmp/build/./base/poco/Net/src/TCPServerDispatcher.cpp:115:38
    unicode-org#65 0x55a1cc5cfbb4 in Poco::PooledThread::run() ci/tmp/build/./base/poco/Foundation/src/ThreadPool.cpp:205:14
    unicode-org#66 0x55a1cc5cc06d in Poco::(anonymous namespace)::RunnableHolder::run() ci/tmp/build/./base/poco/Foundation/src/Thread.cpp:45:11
    unicode-org#67 0x55a1cc5c8ad0 in Poco::ThreadImpl::runnableEntry(void*) ci/tmp/build/./base/poco/Foundation/src/Thread_POSIX.cpp:341:27
    unicode-org#68 0x7f33ed519ac2  (/lib/x86_64-linux-gnu/libc.so.6+0x94ac2) (BuildId: 4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7)
    unicode-org#69 0x7f33ed5ab8bf  (/lib/x86_64-linux-gnu/libc.so.6+0x1268bf) (BuildId: 4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7)

  Member fields were destroyed
    #0 0x55a17b0a66fd in __sanitizer_dtor_callback_fields (/home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp/clickhouse+0xa57c6fd) (BuildId: 90b99d5bc334c7128a6e1b564bd565effb9cdf11)
    #1 0x55a1c49b6243 in icu_78::Locale::Heap::~Heap() ci/tmp/build/./contrib/icu/icu4c/source/common/unicode/locid.h:1234:21
    unicode-org#2 0x55a1c49b6243 in icu_78::Locale::Heap::~Heap() ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:346:1
    unicode-org#3 0x55a1c49b68f2 in icu_78::Locale::Payload::~Payload() ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:404:31
    unicode-org#4 0x55a1c49bf4fd in icu_78::Locale::Nest& icu_78::Locale::Payload::emplace<icu_78::Locale::Nest, icu_78::Locale::Heap, unsigned char>(icu_78::Locale::Heap&&, unsigned char&&) ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:433:15
    unicode-org#5 0x55a1c49bf4fd in icu_78::Locale::setKeywordValue(icu_78::StringPiece, icu_78::StringPiece, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/common/locid.cpp:2799:33
    unicode-org#6 0x55a1c4996b63 in icu_78::Locale::setKeywordValue(char const*, char const*, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/common/unicode/locid.h:745:9
    unicode-org#7 0x55a1c4998a8b in icu_78::CollationLoader::loadFromData(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:452:25
    unicode-org#8 0x55a1c4995fcc in icu_78::CollationLoader::createCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:233:16
    unicode-org#9 0x55a1c4995fcc in icu_78::LocaleCacheKey<icu_78::CollationCacheEntry>::createObject(void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:144:20
    unicode-org#10 0x55a1c4b023e3 in icu_78::UnifiedCache::_get(icu_78::CacheKeyBase const&, icu_78::SharedObject const*&, void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.cpp:394:17
    unicode-org#11 0x55a1c49963c7 in void icu_78::UnifiedCache::get<icu_78::CollationCacheEntry>(icu_78::CacheKey<icu_78::CollationCacheEntry> const&, void const*, icu_78::CollationCacheEntry const*&, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.h:234:8
    unicode-org#12 0x55a1c49963c7 in icu_78::CollationLoader::getCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:477:12
    unicode-org#13 0x55a1c499800b in icu_78::CollationLoader::loadFromCollations(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:383:44
    unicode-org#14 0x55a1c4995fea in icu_78::CollationLoader::createCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:231:16
    unicode-org#15 0x55a1c4995fea in icu_78::LocaleCacheKey<icu_78::CollationCacheEntry>::createObject(void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:144:20
    unicode-org#16 0x55a1c4b023e3 in icu_78::UnifiedCache::_get(icu_78::CacheKeyBase const&, icu_78::SharedObject const*&, void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.cpp:394:17
    unicode-org#17 0x55a1c49963c7 in void icu_78::UnifiedCache::get<icu_78::CollationCacheEntry>(icu_78::CacheKey<icu_78::CollationCacheEntry> const&, void const*, icu_78::CollationCacheEntry const*&, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.h:234:8
    unicode-org#18 0x55a1c49963c7 in icu_78::CollationLoader::getCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:477:12
    unicode-org#19 0x55a1c499776a in icu_78::CollationLoader::loadFromBundle(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:309:16
    unicode-org#20 0x55a1c4997005 in icu_78::CollationLoader::loadFromLocale(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:259:16
    unicode-org#21 0x55a1c4995fd6 in icu_78::CollationLoader::createCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:227:16
    unicode-org#22 0x55a1c4995fd6 in icu_78::LocaleCacheKey<icu_78::CollationCacheEntry>::createObject(void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:144:20
    unicode-org#23 0x55a1c4b023e3 in icu_78::UnifiedCache::_get(icu_78::CacheKeyBase const&, icu_78::SharedObject const*&, void const*, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.cpp:394:17
    unicode-org#24 0x55a1c49963c7 in void icu_78::UnifiedCache::get<icu_78::CollationCacheEntry>(icu_78::CacheKey<icu_78::CollationCacheEntry> const&, void const*, icu_78::CollationCacheEntry const*&, UErrorCode&) const ci/tmp/build/./contrib/icu/icu4c/source/common/unifiedcache.h:234:8
    unicode-org#25 0x55a1c49963c7 in icu_78::CollationLoader::getCacheEntry(UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:477:12
    unicode-org#26 0x55a1c4996164 in icu_78::CollationLoader::loadTailoring(icu_78::Locale const&, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/ucol_res.cpp:164:19
    unicode-org#27 0x55a1c498046c in icu_78::Collator::makeInstance(icu_78::Locale const&, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/coll.cpp:468:40
    unicode-org#28 0x55a1c498046c in icu_78::Collator::createInstance(icu_78::Locale const&, UErrorCode&) ci/tmp/build/./contrib/icu/icu4c/source/i18n/coll.cpp:449:16

SUMMARY: MemorySanitizer: use-of-uninitialized-value ci/tmp/build/./contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h:63:10 in unsigned long std::__1::__constexpr_strlen[abi:ne210105]<char>(char const*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants