[all-commits] [llvm/llvm-project] 1454c2: Syndicate, test and fix base64 implementation
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Tue Mar 3 03:18:08 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1454c27b60447d969d0c1ecaf20b2186fe9d85ec
https://github.com/llvm/llvm-project/commit/1454c27b60447d969d0c1ecaf20b2186fe9d85ec
Author: serge-sans-paille <sguelton at redhat.com>
Date: 2020-03-03 (Tue, 03 Mar 2020)
Changed paths:
M clang-tools-extra/clangd/SemanticHighlighting.cpp
M compiler-rt/lib/fuzzer/FuzzerUtil.cpp
A llvm/include/llvm/Support/Base64.h
A llvm/unittests/Support/Base64Test.cpp
M llvm/unittests/Support/CMakeLists.txt
Log Message:
-----------
Syndicate, test and fix base64 implementation
llvm/Support/Base64, fix its implementation and provide a decent test suite.
Previous implementation code was using + operator instead of | to combine
results, which is a problem when shifting signed values. (0xFF << 16) is
implicitly converted to a (signed) int, and thus results in 0xffff0000,
h is
negative. Combining negative numbers with a + in that context is not what we
want to do.
This is a recommit of 5a1958f2673f8c771e406a7e309e160b432c9a79 with UB removved.
This fixes https://github.com/llvm/llvm-project/issues/149.
Differential Revision: https://reviews.llvm.org/D75057
More information about the All-commits
mailing list