summaryrefslogtreecommitdiff
path: root/Kernel/Arch/aarch64
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-04 09:08:27 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-04 11:59:59 -0800
commit8e2d0c8d5cbbc8a2773c187090f2b652157fd5f5 (patch)
tree5c19baf36d01d848e32e6c74642b3762f2548c59 /Kernel/Arch/aarch64
parentc369626ac19c4f03fb15e5d869c6c9d39ad56fa3 (diff)
downloadserenity-8e2d0c8d5cbbc8a2773c187090f2b652157fd5f5.zip
Kernel: Do not return a null ref in `Processor::current` on aarch64
Clang rejects binding a reference to a null pointer at compile-time. Let's just crash explicitly, instead of waiting for a null dereference to mess things up.
Diffstat (limited to 'Kernel/Arch/aarch64')
-rw-r--r--Kernel/Arch/aarch64/Processor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h
index 4f053d0637..3992cb252f 100644
--- a/Kernel/Arch/aarch64/Processor.h
+++ b/Kernel/Arch/aarch64/Processor.h
@@ -58,7 +58,7 @@ public:
return 0;
}
- ALWAYS_INLINE static Processor& current() { return *((Processor*)0); }
+ ALWAYS_INLINE static Processor& current() { VERIFY_NOT_REACHED(); }
static void deferred_call_queue(Function<void()> /* callback */) { }