9#ifndef MAXOS_RUNTIME_UBSAN_H
10#define MAXOS_RUNTIME_UBSAN_H
15namespace MaxOS::runtime {
29 static void handle(
bool write, uintptr_t address,
size_t size,
void* rip);
32 static void poison_stack(uintptr_t address,
size_t size);
Handles kernel address sanitizer runtime errors.
static void unpoison_stack(uintptr_t address, size_t size)
Marks a region of stack memory as unpoisoned (accessible)
static void handle(bool write, uintptr_t address, size_t size, void *rip)
Handles a KASan error by panicking and printing the details.
static void poison_stack(uintptr_t address, size_t size)
Marks a region of stack memory as poisoned (inaccessible)
static void initialize()
Initializes the KASan handler by setting up the shadow memory.