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

LSM: Switch forest fuzz to stdx.equal_bytes #1243

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

cb22
Copy link
Contributor

@cb22 cb22 commented Oct 24, 2023

std.mem.eql and asBytes hid the fact that we were now incorrectly comparing a double pointer to a single pointer.

Change to stdx.equal_bytes for some nice type safety, and fix the bug.

std.mem.eql and casting to bytes hid the fact that we were now incorrectly
comparing a double pointer to a single pointer.

Change to stdx.equal_bytes for some nice type safety, and fix the bug.
@cb22 cb22 assigned matklad and unassigned matklad Oct 24, 2023
@cb22
Copy link
Contributor Author

cb22 commented Oct 24, 2023

(something funky was up with my build, just double checking)

Ah - #1239 is was still in the merge queue.

@matklad
Copy link
Member

matklad commented Oct 24, 2023

Reminds me that I wanted to vendor better version of asBytes / bytesAsSlice which:

  • would take an explicit T argument to prevent two-star bugs
  • would check that the alignment is correct

This was blocked by ziglang/zig#16245 before, but I think this now is in 0.11? Anway, that's future work!

@matklad matklad added this pull request to the merge queue Oct 24, 2023
Merged via the queue into main with commit 216c196 Oct 24, 2023
29 checks passed
@matklad matklad deleted the cb22/forest-fuzz-fix branch October 24, 2023 14:24
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.

None yet

2 participants