[PATCH] D75057: Syndicate, test and fix base64 implementation
Mitch Phillips via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 09:31:45 PST 2020
hctim added a comment.
Looks like this change broke the UBSan build bots:
FAIL: LLVM-Unit :: Support/./SupportTests/Base64Test.Base64 (3484 of 36324)
******************** TEST 'LLVM-Unit :: Support/./SupportTests/Base64Test.Base64' FAILED ********************
Note: Google Test filter = Base64Test.Base64
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Base64Test
[ RUN ] Base64Test.Base64
/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/Base64.h:42:28: runtime error: left shift of negative value -1
#0 0x4993b6 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > llvm::encodeBase64<llvm::StringRef>(llvm::StringRef const&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/Base64.h:42:28
#1 0x498b78 in (anonymous namespace)::TestBase64(llvm::StringRef, llvm::StringRef) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/unittests/Support/Base64Test.cpp:23:14
#2 0x498aeb in Base64Test_Base64_Test::TestBody() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/unittests/Support/Base64Test.cpp:42:3
#3 0x8d85f9 in testing::Test::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2474:5
#4 0x8d9581 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2656:11
#5 0x8d9f32 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2774:28
#6 0x8e1602 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4649:43
#7 0x8e1085 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4257:10
#8 0x8d0933 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46
#9 0x8d0933 in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
#10 0x7f806f76e2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#11 0x445d39 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/unittests/Support/SupportTests+0x445d39)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/Base64.h:42:28 in
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 68.95s
********************
Failing Tests (1):
LLVM-Unit :: Support/./SupportTests/Base64Test.Base64
- http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/18078/steps/check-llvm%20ubsan/logs/stdio
I'll send out a revert shortly, to reproduce the sanitizer bots you can use the instructions here <https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild>, or, given that this is UBSan, it should be sufficient to just add `-DLLVM_USE_SANITIZER=Undefined` and run `check-llvm` :).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75057/new/
https://reviews.llvm.org/D75057
More information about the cfe-commits
mailing list