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.
This pull request includes several updates to the
libfuzzer
harness to enhance the functionality and remove outdated checks. The most important changes involve adding new fields to theubpf_context_t
structure, removing conditional compilation checks, and updating function signatures to include the program code.Enhancements to
ubpf_context_t
structure:program_start
andprogram_end
fields to theubpf_context_t
structure to track the program boundaries. (libfuzzer/libfuzz_harness.cc
)Removal of outdated checks and conditional compilation:
HAVE_EBPF_VERIFIER_CHECK_CONSTRAINTS_AT_LABEL
conditional compilation checks and related code, simplifying the handling ofstore_pre_invariants
option. (libfuzzer/libfuzz_harness.cc
) [1] [2] [3]Function signature updates:
ubpf_context_from
function to acceptprogram_code
as a parameter and initialize the new fields inubpf_context_t
. (libfuzzer/libfuzz_harness.cc
) [1] [2]call_ubpf_interpreter
andcall_ubpf_jit
functions to passprogram_code
toubpf_context_from
. (libfuzzer/libfuzz_harness.cc
) [1] [2]Additional changes:
g_pc_stack
to track the program counter stack for local calls and exits. (libfuzzer/libfuzz_harness.cc
)