-
Notifications
You must be signed in to change notification settings - Fork 158
Add fuzzing for fast_memcpy #2361
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: benhillis <[email protected]>
Co-authored-by: benhillis <[email protected]>
Co-authored-by: benhillis <[email protected]>
Co-authored-by: benhillis <[email protected]>
Co-authored-by: benhillis <[email protected]>
|
This might be above Copilot's paygrade, I'm just curious what it will come up with. |
|
Probably want to try doing them separately so it doesn't get confused. |
|
@copilot - let's make this task more simple. Just implement fuzzing for fast_memcpy. Look at other examples of fuzzing done in the repo to make sure you are using a similar approach. |
Co-authored-by: benhillis <[email protected]>
Simplified the PR to only include fast_memcpy fuzzing. Removed the trycopy fuzzer and kept the implementation consistent with other fuzzers in the repo (like ucs2 and sparse_mmap). The fuzzer tests both memcpy (with separate buffers) and memmove (with overlapping regions), validated against a reference implementation. Commit: 08b5f97 |
This unsafe memory operation crate had only indirect coverage via the sparse_mmap fuzzer. This adds direct fuzzing for its public APIs.
Changes
fast_memcpy fuzzer: Tests
memcpywith separate buffers andmemmovewith overlapping regions, validated against reference implementationHelper function: Extracted
safe_copy_length()to ensure consistent bounds checking across operationsThe fuzzer follows existing patterns from other fuzz targets in the repository (e.g., ucs2, sparse_mmap).
Example
The fast_memcpy fuzzer validates correctness:
Fixes #2348
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.