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

Windows fixes #4449

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix UB in fuse filter
  • Loading branch information
MonsieurNicolas committed Aug 30, 2024
commit 45291aaa50c99bd4c664fb64c33647416e3f4ee0
6 changes: 3 additions & 3 deletions lib/binaryfusefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ template <typename T> class binary_fuse_t
uint64_t h = binary_fuse_mulhi(hash, SegmentCountLength);
h += index * SegmentLength;
// keep the lower 36 bits
uint64_t hh = hash & ((1UL << 36) - 1);
uint64_t hh = hash & ((1ULL << 36) - 1);
// index 0: right shift by 36; index 1: right shift by 18; index 2: no
// shift
h ^= (size_t)((hh >> (36 - 18 * index)) & SegmentLengthMask);
Expand Down Expand Up @@ -289,9 +289,9 @@ template <typename T> class binary_fuse_t
{
blockBits += 1;
}
uint32_t block = ((uint32_t)1 << blockBits);
uint32_t block = (1ul << blockBits);

std::vector<uint32_t> startPos(1 << blockBits);
std::vector<uint32_t> startPos(block);
uint32_t h012[5];

reverseOrder[size] = 1;
Expand Down
Loading