Skip to content

fix: fix undefined behavior in bitwise left-shift operations across codebase#308

Merged
lxy-9602 merged 5 commits into
alibaba:mainfrom
lxy-9602:fix-shift-ub
May 28, 2026
Merged

fix: fix undefined behavior in bitwise left-shift operations across codebase#308
lxy-9602 merged 5 commits into
alibaba:mainfrom
lxy-9602:fix-shift-ub

Conversation

@lxy-9602
Copy link
Copy Markdown
Collaborator

@lxy-9602 lxy-9602 commented May 27, 2026

Purpose

No Linked issue.

Fix all signed left-shift undefined behavior (UB) across the codebase - signed left-shift that overflows or operates on negative values is UB per the C++ standard.

Tests

API and Format

Documentation

Generative AI tooling

Generated-by: Claude-4.6-Opus

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@zjw1111 zjw1111 requested a review from Copilot May 27, 2026 12:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.

Comment thread src/paimon/common/memory/memory_slice_output.cpp Outdated
Comment thread src/paimon/common/utils/var_length_int_utils.h
Comment thread src/paimon/common/utils/var_length_int_utils.h
Comment thread src/paimon/common/file_index/bloomfilter/fast_hash.cpp Outdated
Copy link
Copy Markdown
Collaborator

@zjw1111 zjw1111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one correctness issue in the varint decoder overflow handling.

Comment thread src/paimon/common/utils/var_length_int_utils.h
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Comment thread src/paimon/common/utils/bloom_filter64.cpp
Comment thread src/paimon/common/utils/bit_set.cpp
Comment thread src/paimon/common/memory/memory_segment_utils.cpp
@lxy-9602 lxy-9602 merged commit 7cbd28c into alibaba:main May 28, 2026
9 of 10 checks passed
lxy-9602 added a commit to lxy-9602/paimon-cpp that referenced this pull request May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants