Skip to content

misc#330

Merged
Smattr merged 6 commits into
mainfrom
smattr/93ce2fd2-c8d0-42c2-af89-c56b3e3dbb91
Jun 10, 2026
Merged

misc#330
Smattr merged 6 commits into
mainfrom
smattr/93ce2fd2-c8d0-42c2-af89-c56b3e3dbb91

Conversation

@Smattr

@Smattr Smattr commented Jun 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

Smattr added 6 commits June 8, 2026 19:40
OpenCode notices that the argument to CLZ could evaluate to 0, leading
to UB. The follow on problem here is that even if it were not, this
still leads to an invalid large `INITIAL_SET_SIZE_EXPONENT`. The effect
of this would be for `--set-capacity x` where `x` is a small number to
generate code that would malfunction at runtime.

Reported-by: OpenCode 1.16.2
Reported-by: OpenCode 1.16.2
OpenCode complains that the shift in this function could be
out-of-range. This is a false positive, seemingly influenced by other
incorrect inferences OpenCode makes about this file. But lets try to
guide static analysis tools like this to something more accurate.

Reported-by: OpenCode 1.16.2
@Smattr
Smattr merged commit f9583e8 into main Jun 10, 2026
19 of 22 checks passed
@Smattr
Smattr deleted the smattr/93ce2fd2-c8d0-42c2-af89-c56b3e3dbb91 branch June 10, 2026 00:16
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.

1 participant