infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
fuzz_direct.c File Reference

Fuzzer target for the Direct Marshalling API generation logic. More...

#include "fuzz_helpers.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for fuzz_direct.c:

Macros

#define APPEND_LITERAL(lit)
 

Functions

void _infix_clear_error (void)
 Clears the thread-local error state.
 
infix_direct_value_t dummy_scalar_marshaller (void *src)
 
void dummy_agg_marshaller (void *src, void *dest, const infix_type *type)
 
void dummy_writeback (void *src, void *c_data, const infix_type *type)
 
void dummy_target_func (void)
 
static void FuzzTest (fuzzer_input in)
 
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 

Detailed Description

Fuzzer target for the Direct Marshalling API generation logic.

Macro Definition Documentation

◆ APPEND_LITERAL

#define APPEND_LITERAL (   lit)
Value:
do { \
size_t len = sizeof(lit) - 1; \
if (remain < len) \
goto sig_done; \
memcpy(p, lit, len); \
p += len; \
remain -= len; \
} while (0)

Function Documentation

◆ _infix_clear_error()

void _infix_clear_error ( void  )
extern

Clears the thread-local error state.

Located in src/core/error.c. This is called at the beginning of every public API function to ensure that a prior error from an unrelated call is not accidentally returned.

◆ dummy_agg_marshaller()

void dummy_agg_marshaller ( void *  src,
void *  dest,
const infix_type type 
)

◆ dummy_scalar_marshaller()

infix_direct_value_t dummy_scalar_marshaller ( void *  src)

◆ dummy_target_func()

void dummy_target_func ( void  )

◆ dummy_writeback()

void dummy_writeback ( void *  src,
void *  c_data,
const infix_type type 
)

◆ FuzzTest()

static void FuzzTest ( fuzzer_input  in)
static

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t *  data,
size_t  size 
)