Skip to content

Use unsigned arithmetic for uint division#899

Merged
snazy merged 1 commit into
projectnessie:mainfrom
snazy:unsigned-fix
Jul 17, 2026
Merged

Use unsigned arithmetic for uint division#899
snazy merged 1 commit into
projectnessie:mainfrom
snazy:unsigned-fix

Conversation

@snazy

@snazy snazy commented Jul 16, 2026

Copy link
Copy Markdown
Member

CEL uint values above Long.MAX_VALUE are stored in signed long slots, so Java signed / and % produced incorrect results for high unsigned operands.

Use Long.divideUnsigned() and Long.remainderUnsigned(), and cover high-bit operands in uint division and modulo tests.

CEL uint values above Long.MAX_VALUE are stored in signed long slots, so Java signed / and % produced incorrect results for high unsigned operands.

Use Long.divideUnsigned() and Long.remainderUnsigned(), and cover high-bit operands in uint division and modulo tests.
@snazy
snazy requested a review from XN137 July 16, 2026 15:54
@snazy
snazy merged commit 3c7ae03 into projectnessie:main Jul 17, 2026
3 checks passed
@snazy
snazy deleted the unsigned-fix branch July 17, 2026 07:11
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.

2 participants