diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-12-04 09:08:27 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-04 11:59:59 -0800 |
commit | 8e2d0c8d5cbbc8a2773c187090f2b652157fd5f5 (patch) | |
tree | 5c19baf36d01d848e32e6c74642b3762f2548c59 /Kernel/Arch/aarch64 | |
parent | c369626ac19c4f03fb15e5d869c6c9d39ad56fa3 (diff) | |
download | serenity-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.h | 2 |
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 */) { } |