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/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 }
 

Functions

void dummy_reg_handler (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:

  • A descriptive name of the bug it triggered.
  • A Base64-encoded string representing the raw fuzzer input.
  • The target component (TARGET_TYPE_GENERATOR, TARGET_SIGNATURE_PARSER, etc.) that the input should be sent to.

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 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 

Function Documentation

◆ dummy_reg_handler()

void dummy_reg_handler ( void  )

◆ for()

for ( ) &

◆ plan()

plan ( num_tests  )

◆ run_regression_case()

static 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:37