smite-nyx-sys: document Nyx FFI bindings#62
Open
psg-19 wants to merge 1 commit into
Open
Conversation
5046186 to
1849020
Compare
morehouse
reviewed
Apr 30, 2026
Comment on lines
+6
to
+7
| //! injects a new input and collects coverage. And all this without restarting the | ||
| //! target process. |
Owner
There was a problem hiding this comment.
Suggested change
| //! injects a new input and collects coverage. And all this without restarting the | |
| //! target process. | |
| //! injects a new input and collects coverage without restarting the target | |
| //! process. |
Comment on lines
+43
to
+44
| /// `data` must be large enough for the full payload; the C agent does not | ||
| /// clamp the copy to `max_size`. Pass the size returned by [`nyx_init`]. |
Owner
There was a problem hiding this comment.
Actually I think it does? max_size determines the size of the payload buffer, which will naturally be the largest input that can ever be returned in data.
Suggested change
| /// `data` must be large enough for the full payload; the C agent does not | |
| /// clamp the copy to `max_size`. Pass the size returned by [`nyx_init`]. | |
| /// `max_size` is the maximum number of bytes that can be written to `data`. |
Comment on lines
+20
to
+21
| /// Initializes the Nyx agent and returns the maximum fuzz input size | ||
| /// (in bytes) supported by the host. |
Owner
There was a problem hiding this comment.
Suggested change
| /// Initializes the Nyx agent and returns the maximum fuzz input size | |
| /// (in bytes) supported by the host. | |
| /// Initializes the Nyx agent and returns the maximum fuzz input size | |
| /// (in bytes) supported by the host. Also sets `__AFL_SHM_ID` to the | |
| /// allocated shared memory ID and sets `AFL_MAP_SIZE` to the size of | |
| /// the shared memory region. |
Comment on lines
+49
to
+52
| /// Skips the current test case and resets the coverage bitmap and restores | ||
| /// the VM to the snapshot state. | ||
| /// After this call, execution resumes from the snapshot point inside | ||
| /// [`nyx_get_fuzz_input`]. |
Owner
There was a problem hiding this comment.
Suggested change
| /// Skips the current test case and resets the coverage bitmap and restores | |
| /// the VM to the snapshot state. | |
| /// After this call, execution resumes from the snapshot point inside | |
| /// [`nyx_get_fuzz_input`]. | |
| /// Skips the current test case, resets the coverage bitmap, and restores the | |
| /// VM to the snapshot state. After this call, execution resumes from the | |
| /// snapshot point inside [`nyx_get_fuzz_input`]. |
Comment on lines
+56
to
+58
| /// state. | ||
| /// After this call the execution resumes from the snapshot point inside | ||
| /// [`nyx_get_fuzz_input`]. |
Owner
There was a problem hiding this comment.
Suggested change
| /// state. | |
| /// After this call the execution resumes from the snapshot point inside | |
| /// [`nyx_get_fuzz_input`]. | |
| /// state. After this call the execution resumes from the snapshot point | |
| /// inside [`nyx_get_fuzz_input`]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added crate level docs for
smite-nyx-sysand documented the exported Nyx agent FFI functions