diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-03-10 20:33:01 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-11 12:32:53 +0100 |
commit | f38a6b18b55aad9ae6aee0aa2f8490079c79e73e (patch) | |
tree | 6501aa9a4a0dbb032e9a1dd2a644a1989c56627e | |
parent | 798dea7a4964b08b9aeec2e68183819262b40daf (diff) | |
download | serenity-f38a6b18b55aad9ae6aee0aa2f8490079c79e73e.zip |
crash: Fix more typos in check logic
These caused no test to run for '-f' and mmap to fail, respectively.
-rw-r--r-- | Userland/Utilities/crash.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/crash.cpp b/Userland/Utilities/crash.cpp index cb9cad0cbf..1aacf79aa3 100644 --- a/Userland/Utilities/crash.cpp +++ b/Userland/Utilities/crash.cpp @@ -200,7 +200,7 @@ int main(int argc, char** argv) }).run(run_type); } - if (do_read_from_uninitialized_malloc_memory || do_all_crash_types) { + if (do_read_from_freed_memory || do_all_crash_types) { Crash("Read from freed memory", []() { auto* uninitialized_memory = (volatile u32**)malloc(1024); if (!uninitialized_memory) @@ -237,7 +237,7 @@ int main(int argc, char** argv) if (do_write_to_read_only_memory || do_all_crash_types) { Crash("Write to read only memory", []() { - auto* ptr = (u8*)mmap(nullptr, 4096, PROT_READ | PROT_WRITE, MAP_ANON, 0, 0); + auto* ptr = (u8*)mmap(nullptr, 4096, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, 0, 0); if (ptr == MAP_FAILED) return Crash::Failure::UnexpectedError; |