linux/lib/test_ubsan.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>

test_ubsan_fp;

#define UBSAN_TEST(config, ...)

static void test_ubsan_add_overflow(void)
{}

static void test_ubsan_sub_overflow(void)
{}

static void test_ubsan_mul_overflow(void)
{}

static void test_ubsan_negate_overflow(void)
{}

static void test_ubsan_divrem_overflow(void)
{}

static void test_ubsan_shift_out_of_bounds(void)
{}

static void test_ubsan_out_of_bounds(void)
{}

enum ubsan_test_enum {};

static void test_ubsan_load_invalid_value(void)
{}

static void test_ubsan_misaligned_access(void)
{}

static const test_ubsan_fp test_ubsan_array[] =;

/* Excluded because they Oops the module. */
static __used const test_ubsan_fp skip_ubsan_array[] =;

static int __init test_ubsan_init(void)
{}
module_init(test_ubsan_init);

static void __exit test_ubsan_exit(void)
{}
module_exit(test_ubsan_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();