diff options
Diffstat (limited to 'Kernel/Prekernel')
-rw-r--r-- | Kernel/Prekernel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Kernel/Prekernel/UBSanitizer.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Kernel/Prekernel/CMakeLists.txt b/Kernel/Prekernel/CMakeLists.txt index d3bd1a7538..4c4f2a50e3 100644 --- a/Kernel/Prekernel/CMakeLists.txt +++ b/Kernel/Prekernel/CMakeLists.txt @@ -1,4 +1,5 @@ set(SOURCES + UBSanitizer.cpp ) if ("${SERENITY_ARCH}" STREQUAL "aarch64") set(SOURCES @@ -12,7 +13,6 @@ else() Arch/x86/boot.S Arch/x86/multiboot.S # FIXME: Eventually, some of these should build on aarch64 too. - UBSanitizer.cpp init.cpp ../MiniStdLib.cpp ../../Userland/Libraries/LibELF/Relocation.cpp diff --git a/Kernel/Prekernel/UBSanitizer.cpp b/Kernel/Prekernel/UBSanitizer.cpp index 02845523a4..0d258fe38b 100644 --- a/Kernel/Prekernel/UBSanitizer.cpp +++ b/Kernel/Prekernel/UBSanitizer.cpp @@ -15,7 +15,11 @@ extern "C" { static void print_location(const SourceLocation&) { +#if ARCH(I386) || ARCH(X86_64) asm volatile("cli; hlt"); +#else + for (;;) { } +#endif } void __ubsan_handle_load_invalid_value(const InvalidValueData&, ValueHandle) __attribute__((used)); |