Fixed error in UBSan [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-09-02 00:18:33 +03:00
parent 61413ead23
commit 45a4a95959

View File

@ -14,6 +14,7 @@
*/ */
#include <common/Types.h> #include <common/Types.h>
#include <common/unaligned.h>
#include <type_traits> #include <type_traits>
#define ROTL(x, b) static_cast<UInt64>(((x) << (b)) | ((x) >> (64 - (b)))) #define ROTL(x, b) static_cast<UInt64>(((x) << (b)) | ((x) >> (64 - (b))))
@ -106,7 +107,7 @@ public:
while (data + 8 <= end) while (data + 8 <= end)
{ {
current_word = *reinterpret_cast<const UInt64 *>(data); current_word = unalignedLoad<UInt64>(data);
v3 ^= current_word; v3 ^= current_word;
SIPROUND; SIPROUND;