summaryrefslogtreecommitdiff
path: root/Tests/Kernel/crash.cpp
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2022-10-12 22:07:37 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-14 13:01:13 +0200
commitdadf656dc984c1af7b720d6fdcf6a2f095a4ed09 (patch)
treeea5a4ac916e38c242dd60aabd2dc11a4ab69fe23 /Tests/Kernel/crash.cpp
parent7a8206197eae9937a0751ac9e22d55aaf950cec8 (diff)
downloadserenity-dadf656dc984c1af7b720d6fdcf6a2f095a4ed09.zip
Tests+Userland: Prefer using __builtin_trap() instead of UD2
This way we don't have to hard-code per-architecture instructions.
Diffstat (limited to 'Tests/Kernel/crash.cpp')
-rw-r--r--Tests/Kernel/crash.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/Kernel/crash.cpp b/Tests/Kernel/crash.cpp
index 513b10e243..d5be7cd87f 100644
--- a/Tests/Kernel/crash.cpp
+++ b/Tests/Kernel/crash.cpp
@@ -113,7 +113,7 @@ int main(int argc, char** argv)
if (do_illegal_instruction || do_all_crash_types) {
any_failures |= !Crash("Illegal instruction", []() {
- asm volatile("ud2");
+ __builtin_trap();
return Crash::Failure::DidNotCrash;
}).run(run_type);
}