Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential asan error for string tests #4280

Closed
SchrodingerZhu opened this issue Mar 15, 2022 · 0 comments · Fixed by #4279 or #4315
Closed

potential asan error for string tests #4280

SchrodingerZhu opened this issue Mar 15, 2022 · 0 comments · Fixed by #4279 or #4315
Assignees
Labels
severity/minor type/bug The issue is confirmed as a bug.

Comments

@SchrodingerZhu
Copy link
Contributor

[2022-03-14T18:40:22.860Z] �[0;32m[ RUN      ] �[mStringsLowerUpperUtf8.Random
[2022-03-14T18:40:22.860Z] seeded with: 704131005
[2022-03-14T18:40:22.860Z] =================================================================
[2022-03-14T18:40:22.860Z] ==19963==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000004f4f17e at pc 0x00001d4a3aee bp 0x7ffee3259300 sp 0x7ffee32592f8
[2022-03-14T18:40:22.860Z] READ of size 2 at 0x000004f4f17e thread T0
[2022-03-14T18:40:22.860Z]     #0 0x1d4a3aed in Poco::Unicode::properties(int, Poco::Unicode::CharacterProperties&) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/poco/Foundation/src/Unicode.cpp:63:26
[2022-03-14T18:40:22.860Z]     #1 0x1d4a3aed in Poco::Unicode::isUpper(int) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/poco/Foundation/include/Poco/Unicode.h:319:2
[2022-03-14T18:40:22.860Z]     #2 0x1d4a3aed in Poco::Unicode::toLower(int) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/poco/Foundation/src/Unicode.cpp:72:6
[2022-03-14T18:40:22.860Z]     #3 0xe08503f in void DB::(anonymous namespace)::toCaseImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>(unsigned char const*&, unsigned char const*, unsigned char*&) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Functions/FunctionsString.cpp:402:45
[2022-03-14T18:40:22.860Z]     #4 0xe08503f in DB::(anonymous namespace)::_TiflashAVXTarget_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>::invoke(unsigned char const*&, unsigned char const*, unsigned char*&) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Functions/FunctionsString.cpp:459:1
[2022-03-14T18:40:22.860Z]     #5 0xe099392 in void DB::TargetSpecific::Dispatch<DB::(anonymous namespace)::_TiflashAVXTarget_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>, DB::(anonymous namespace)::_TiflashSSE4Target_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>, DB::(anonymous namespace)::_TiflashGenericTarget_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))> >::invoke<unsigned char const*&, unsigned char const* const&, unsigned char*&>(unsigned char const*&, unsigned char const* const&, unsigned char*&) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Common/TargetSpecific.h:216:24
[2022-03-14T18:40:22.860Z]     #6 0xe099392 in void DB::TargetSpecific::Dispatch<DB::(anonymous namespace)::_TiflashAVX512Target_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>, DB::(anonymous namespace)::_TiflashAVXTarget_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>, DB::(anonymous namespace)::_TiflashSSE4Target_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>, DB::(anonymous namespace)::_TiflashGenericTarget_lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))> >::invoke<unsigned char const*&, unsigned char const* const&, unsigned char*&>(unsigned char const*&, unsigned char const* const&, unsigned char*&) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Common/TargetSpecific.h:219:16
[2022-03-14T18:40:22.860Z]     #7 0xe099392 in void DB::(anonymous namespace)::lowerUpperUTF8ArrayImpl<(char)65, (char)90, (char)127, (char)32, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>(unsigned char const*&, unsigned char const*, unsigned char*&) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Functions/FunctionsString.cpp:459:1
[2022-03-14T18:40:22.860Z]     #8 0xe099392 in DB::LowerUpperUTF8Impl<(char)65, (char)90, &(Poco::Unicode::toLower(int)), &(void DB::UTF8CyrillicToCase<true>(unsigned char const*&, unsigned char*&))>::array(unsigned char const*, unsigned char const*, unsigned char*) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Functions/FunctionsString.cpp:593:5
[2022-03-14T18:40:22.860Z]     #9 0x943d419 in DB::tests::StringsLowerUpperUtf8_Random_Test::TestBody() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/Functions/tests/gtest_strings_simd_consistency.cpp:335:13
[2022-03-14T18:40:22.860Z]     #10 0x1aef3b80 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2401:10
[2022-03-14T18:40:22.860Z]     #11 0x1aef3b80 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2437:14
[2022-03-14T18:40:22.860Z]     #12 0x1aea4118 in testing::Test::Run() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2473:5
[2022-03-14T18:40:22.860Z]     #13 0x1aea7227 in testing::TestInfo::Run() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2655:11
[2022-03-14T18:40:22.860Z]     #14 0x1aea878f in testing::TestCase::Run() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2773:28
[2022-03-14T18:40:22.860Z]     #15 0x1aec3988 in testing::internal::UnitTestImpl::RunAllTests() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:4673:43
[2022-03-14T18:40:22.860Z]     #16 0x1aef5bb0 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2401:10
[2022-03-14T18:40:22.860Z]     #17 0x1aef5bb0 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:2437:14
[2022-03-14T18:40:22.860Z]     #18 0x1aec25aa in testing::UnitTest::Run() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/src/gtest.cc:4281:10
[2022-03-14T18:40:22.860Z]     #19 0xa711e4a in RUN_ALL_TESTS() /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/googletest/googletest/include/gtest/gtest.h:2237:46
[2022-03-14T18:40:22.860Z]     #20 0xa711e4a in main /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/dbms/src/TestUtils/gtests_dbms_main.cpp:22:16
[2022-03-14T18:40:22.860Z]     #21 0x7f1a90346554 in __libc_start_main (/lib64/libc.so.6+0x22554)
[2022-03-14T18:40:22.860Z]     #22 0x6483328 in _start (/tiflash/gtests_dbms+0x6483328)
[2022-03-14T18:40:22.860Z] 
[2022-03-14T18:40:22.860Z] 0x000004f4f17e is located 2 bytes to the left of global variable '_pcre_ucd_stage2' defined in '/home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/poco/Foundation/src/pcre_ucd.c:1349:19' (0x4f4f180) of size 58112
[2022-03-14T18:40:22.860Z] 0x000004f4f17e is located 2174 bytes to the right of global variable '_pcre_ucd_stage1' defined in '/home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/poco/Foundation/src/pcre_ucd.c:802:18' (0x4f4c700) of size 8704
[2022-03-14T18:40:22.860Z] SUMMARY: AddressSanitizer: global-buffer-overflow /home/jenkins/agent/workspace/tiflash-sanitizer-daily/tiflash/contrib/poco/Foundation/src/Unicode.cpp:63:26 in Poco::Unicode::properties(int, Poco::Unicode::CharacterProperties&)
[2022-03-14T18:40:22.861Z] Shadow bytes around the buggy address:
[2022-03-14T18:40:22.861Z]   0x0000809e1dd0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
[2022-03-14T18:40:22.861Z]   0x0000809e1de0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
[2022-03-14T18:40:22.861Z]   0x0000809e1df0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
[2022-03-14T18:40:22.861Z]   0x0000809e1e00: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
[2022-03-14T18:40:22.861Z]   0x0000809e1e10: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
[2022-03-14T18:40:22.861Z] =>0x0000809e1e20: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9[f9]
[2022-03-14T18:40:22.861Z]   0x0000809e1e30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2022-03-14T18:40:22.861Z]   0x0000809e1e40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2022-03-14T18:40:22.861Z]   0x0000809e1e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2022-03-14T18:40:22.861Z]   0x0000809e1e60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2022-03-14T18:40:22.861Z]   0x0000809e1e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2022-03-14T18:40:22.861Z] Shadow byte legend (one shadow byte represents 8 application bytes):
[2022-03-14T18:40:22.861Z]   Addressable:           00
[2022-03-14T18:40:22.861Z]   Partially addressable: 01 02 03 04 05 06 07
[2022-03-14T18:40:22.861Z]   Heap left redzone:       fa
[2022-03-14T18:40:22.861Z]   Freed heap region:       fd
[2022-03-14T18:40:22.861Z]   Stack left redzone:      f1
[2022-03-14T18:40:22.861Z]   Stack mid redzone:       f2
[2022-03-14T18:40:22.861Z]   Stack right redzone:     f3
[2022-03-14T18:40:22.861Z]   Stack after return:      f5
[2022-03-14T18:40:22.861Z]   Stack use after scope:   f8
[2022-03-14T18:40:22.861Z]   Global redzone:          f9
[2022-03-14T18:40:22.861Z]   Global init order:       f6
[2022-03-14T18:40:22.861Z]   Poisoned by user:        f7
[2022-03-14T18:40:22.861Z]   Container overflow:      fc
[2022-03-14T18:40:22.861Z]   Array cookie:            ac
[2022-03-14T18:40:22.861Z]   Intra object redzone:    bb
[2022-03-14T18:40:22.861Z]   ASan internal:           fe
[2022-03-14T18:40:22.861Z]   Left alloca redzone:     ca
[2022-03-14T18:40:22.861Z]   Right alloca redzone:    cb
[2022-03-14T18:40:22.861Z] ==19963==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
1 participant