Kernel: Add ubsan

My brain has been melting since I'm getting very random bugs.
I hope I can debug them better with ubsan :)
This commit is contained in:
Bananymous
2023-03-06 23:38:05 +02:00
parent e480f9c195
commit 06db890d49
8 changed files with 128 additions and 12 deletions

View File

@@ -27,6 +27,10 @@ CPPFLAGS:=$(CPPFLAGS) $(KERNEL_ARCH_CPPFLAGS)
LDFLAGS:=$(LDFLAGS) $(KERNEL_ARCH_LDFLAGS)
LIBS:=$(LIBS) $(KERNEL_ARCH_LIBS)
ifeq ($(UBSAN), 1)
CFLAGS:=$(CFLAGS) -fsanitize=undefined
endif
BUILDDIR=$(abspath build)
KERNEL_OBJS= \
@@ -58,6 +62,7 @@ kernel/Thread.o \
kernel/TTY.o \
kernel/VesaTerminalDriver.o \
icxxabi.o \
ubsan.o \
OBJS= \
$(ARCHDIR)/crti.o \