diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2022-10-12 22:07:37 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-14 13:01:13 +0200 |
commit | dadf656dc984c1af7b720d6fdcf6a2f095a4ed09 (patch) | |
tree | ea5a4ac916e38c242dd60aabd2dc11a4ab69fe23 /Tests/Kernel/crash.cpp | |
parent | 7a8206197eae9937a0751ac9e22d55aaf950cec8 (diff) | |
download | serenity-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.cpp | 2 |
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); } |