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

A suite of regression tests for bugs discovered by fuzzing. More...

#include "common/compat_c23.h"
#include "common/double_tap.h"
#include "fuzz_helpers.h"
#include "fuzz_regression_helpers.h"
#include <infix/infix.h>
Include dependency graph for 850_regression_cases.c:

Classes

struct  regression_test_case_t

Macros

#define DBLTAP_IMPLEMENTATION

Enumerations

enum  fuzzer_target_t {
  TARGET_TYPE_GENERATOR , TARGET_SIGNATURE_PARSER , TARGET_TRAMPOLINE_GENERATOR , TARGET_DIRECT_TRAMPOLINE_GENERATOR ,
  TARGET_ABI_CLASSIFIER , TARGET_CACHE_BOUNDED
}

Functions

void dummy_reg_handler (void)
static infix_direct_value_t dummy_scalar_marshaller (void *src)
static void dummy_agg_marshaller (void *src, void *dest, const infix_type *type)
static void dummy_writeback (void *src, void *c_data, const infix_type *type)
static void dummy_target_func (void)
static void run_regression_case (const regression_test_case_t *test)
 plan (num_tests)
 for (size_t i=0;i< num_tests;++i) run_regression_case(&regression_tests[i])

Variables

static const regression_test_case_t regression_tests []
 TEST

Detailed Description

A suite of regression tests for bugs discovered by fuzzing.

This test file contains a collection of specific inputs that have been identified by fuzzing tools (like libFuzzer and AFL) as causing a crash, timeout, memory leak, or other bug in the past.

Each test case consists of:

By embedding these inputs into a permanent unit test, we can ensure that these specific bugs do not reappear in future versions of the library. This forms a crucial part of the project's quality assurance process. The infix_b64_decode helper from fuzz_regression_helpers.h is used to unpack the inputs at runtime.

Macro Definition Documentation

◆ DBLTAP_IMPLEMENTATION

#define DBLTAP_IMPLEMENTATION

Enumeration Type Documentation

◆ fuzzer_target_t

Enumerator
TARGET_TYPE_GENERATOR 
TARGET_SIGNATURE_PARSER 
TARGET_TRAMPOLINE_GENERATOR 
TARGET_DIRECT_TRAMPOLINE_GENERATOR 
TARGET_ABI_CLASSIFIER 
TARGET_CACHE_BOUNDED 

Function Documentation

◆ dummy_agg_marshaller()

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

◆ dummy_reg_handler()

void dummy_reg_handler ( void )

◆ dummy_scalar_marshaller()

infix_direct_value_t dummy_scalar_marshaller ( void * src)
static

◆ dummy_target_func()

void dummy_target_func ( void )
static

◆ dummy_writeback()

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

◆ for()

for ( ) &

◆ plan()

plan ( num_tests )

◆ run_regression_case()

void run_regression_case ( const regression_test_case_t * test)
static

Variable Documentation

◆ regression_tests

const regression_test_case_t regression_tests[]
static

◆ TEST

TEST
Initial value:
{
size_t num_tests = sizeof(regression_tests) / sizeof(regression_tests[0])
static const regression_test_case_t regression_tests[]
Definition 850_regression_cases.c:62