MemorySanitizer: use-of-uninitialized-value in genrb.cpp

Description

Try to build ICU with MASN to debug fuzzer problem but won't reach there

how to reproduce that
cd icu/icu4c/source
CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" ./runConfigureICU --enable-debug --disable-release Linux --disable-layoutex
make clean
make -j 20 tests

got a lot of similar warning

==2455960==WARNING: MemorySanitizer: use-of-uninitialized-value
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -s . -d ./out/build/icudt67l -c mappings/ibm-856_P100-1995.ucm
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -s . -d ./out/build/icudt67l -c mappings/ibm-857_P100-1995.ucm
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -s . -d ./out/build/icudt67l -c mappings/ibm-858_P100-1997.ucm
#0 0x51c78f in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_get_insert_unique_pos(int const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:2092:7
#1 0x51c160 in std::pair<std::_Rb_tree_iterator<int>, bool> std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_insert_unique<int const&>(int const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:2148:4
#2 0x51bf71 in std::set<int, std::less<int>, std::allocator<int> >::insert(int const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_set.h:512:9
#3 0x5152ee in SRBRoot::compactKeys(UErrorCode&)::$_0::operator()(int) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1367:27
#4 0x514c82 in std::_Function_handler<void (int), SRBRoot::compactKeys(UErrorCode&)::$_0>::_M_invoke(std::_Any_data const&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300:2
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -s . -d ./out/build/icudt67l -c mappings/ibm-860_P100-1995.ucm
#5 0x517e92 in std::function<void (int)>::operator()(int) const /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688:14
#6 0x510a40 in SResource::collectKeys(std::function<void (int)>) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1345:5
#7 0x510da0 in ContainerResource::collectKeys(std::function<void (int)>) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1351:15
#8 0x510da0 in ContainerResource::collectKeys(std::function<void (int)>) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1351:15
#9 0x504921 in SRBRoot::compactKeys(UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1365:16
#10 0x50080f in SRBRoot::write(char const*, char const*, char*, int, UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:846:5
#0 0x51f55a in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_lower_bound(std::_Rb_tree_node<int> const*, std::_Rb_tree_node_base const*, int const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:1944:7
#11 0x4bff3a in processFile(char const*, char const*, char const*, char const*, char const*, char const*, SRBRoot*, signed char, UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/genrb.cpp:743:15
#12 0x4bbf3e in main /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/genrb.cpp:544:9
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -s . -d ./out/build/icudt67l -c mappings/ibm-861_P100-1995.ucm
#1 0x51f067 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::find(int const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:2570:28
#2 0x5183a2 in std::set<int, std::less<int>, std::allocator<int> >::count(int const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_set.h:749:21
#3 0x5054cf in SRBRoot::compactKeys(UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1393:41
#4 0x50080f in SRBRoot::write(char const*, char const*, char*, int, UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:846:5
#5 0x4bff3a in processFile(char const*, char const*, char const*, char const*, char const*, char const*, SRBRoot*, signed char, UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/genrb.cpp:743:15
#6 0x4bbf3e in main /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/genrb.cpp:544:9
#13 0x7f70c05ede0a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26e0a)
#14 0x4269c9 in _start (/usr/local/google/home/ftang/icu/icu/icu4c/source/bin/genrb+0x4269c9)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:2092:7 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_get_insert_unique_pos(int const&)
Exiting
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -s . -d ./out/build/icudt67l -c mappings/ibm-862_P100-1995.ucm
#7 0x7f69af390e0a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26e0a)
#8 0x4269c9 in _start (/usr/local/google/home/ftang/icu/icu/icu4c/source/bin/genrb+0x4269c9)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:1944:7 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_lower_bound(std::_Rb_tree_node<int> const*, std::_Rb_tree_node_base const*, int const&) const
Exiting
#0 0x51c78f in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_get_insert_unique_pos(int const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:2092:7
#1 0x51c160 in std::pair<std::_Rb_tree_iterator<int>, bool> std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_insert_unique<int const&>(int const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:2148:4
#2 0x51bf71 in std::set<int, std::less<int>, std::allocator<int> >::insert(int const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_set.h:512:9
#3 0x5152ee in SRBRoot::compactKeys(UErrorCode&)::$_0::operator()(int) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1367:27
#4 0x514c82 in std::_Function_handler<void (int), SRBRoot::compactKeys(UErrorCode&)::$_0>::_M_invoke(std::_Any_data const&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300:2
#5 0x517e92 in std::function<void (int)>::operator()(int) const /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688:14
#6 0x510c13 in ContainerResource::collectKeys(std::function<void (int)>) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1349:5
#7 0x510da0 in ContainerResource::collectKeys(std::function<void (int)>) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1351:15
#8 0x510da0 in ContainerResource::collectKeys(std::function<void (int)>) const /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1351:15
#9 0x504921 in SRBRoot::compactKeys(UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:1365:16
#10 0x50080f in SRBRoot::write(char const*, char const*, char*, int, UErrorCode&) /usr/local/google/home/ftang/icu/icu/icu4c/source/tools/genrb/reslist.cpp:846:5
make[1]: *** [../data/rules.mk:705: out/build/icudt67l/genderList.res] Error 77

Assignee

Unassigned

Reporter

Frank Yung-Fong Tang

Components

Labels

Reviewer

None

Priority

TBD

Time Needed

None

Fix versions

None
Configure