summaryrefslogtreecommitdiff
path: root/Kernel/Prekernel/UBSanitizer.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-09-06 21:01:13 -0400
committerLinus Groh <mail@linusgroh.de>2021-09-07 20:15:15 +0100
commit208aa05cf3b0d0fbc40efd2cb52befbf296ddb23 (patch)
treeaf08a72a69fac85c4655ceb958c5950d9bb859e2 /Kernel/Prekernel/UBSanitizer.cpp
parentd0b0c45690c9314ddb353cf3ffd59ff92a9bbf7c (diff)
downloadserenity-208aa05cf3b0d0fbc40efd2cb52befbf296ddb23.zip
Kernel: Build UBSanitizer.cpp in aarch64 builds
All these symbols will be needed once we build MiniStdLib.cpp.
Diffstat (limited to 'Kernel/Prekernel/UBSanitizer.cpp')
-rw-r--r--Kernel/Prekernel/UBSanitizer.cpp4
1 files changed, 4 insertions, 0 deletions
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));