diff options
| author | 2023-12-25 13:50:22 +0100 | |
|---|---|---|
| committer | 2023-12-26 10:35:14 +0100 | |
| commit | 4f569fd568590b43cd8d924a6abf3c13632a098a (patch) | |
| tree | 8351b6afbd99abb2538286e5bd110317c5d5422e /src/common/assert.cpp | |
| parent | Merge pull request #12394 from liamwhite/per-process-memory (diff) | |
| download | yuzu-4f569fd568590b43cd8d924a6abf3c13632a098a.tar.gz yuzu-4f569fd568590b43cd8d924a6abf3c13632a098a.tar.xz yuzu-4f569fd568590b43cd8d924a6abf3c13632a098a.zip | |
assert/logging: Stop the logging thread and flush the backends before crashing
Co-Authored-By: SachinVin <26602104+SachinVin@users.noreply.github.com>
Diffstat (limited to 'src/common/assert.cpp')
| -rw-r--r-- | src/common/assert.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/assert.cpp b/src/common/assert.cpp index 6026b7dc2..e2c2cade3 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp | |||
| @@ -3,16 +3,19 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/assert.h" | 4 | #include "common/assert.h" |
| 5 | #include "common/common_funcs.h" | 5 | #include "common/common_funcs.h" |
| 6 | #include "common/logging/backend.h" | ||
| 6 | 7 | ||
| 7 | #include "common/settings.h" | 8 | #include "common/settings.h" |
| 8 | 9 | ||
| 9 | void assert_fail_impl() { | 10 | void assert_fail_impl() { |
| 10 | if (Settings::values.use_debug_asserts) { | 11 | if (Settings::values.use_debug_asserts) { |
| 12 | Common::Log::Stop(); | ||
| 11 | Crash(); | 13 | Crash(); |
| 12 | } | 14 | } |
| 13 | } | 15 | } |
| 14 | 16 | ||
| 15 | [[noreturn]] void unreachable_impl() { | 17 | [[noreturn]] void unreachable_impl() { |
| 18 | Common::Log::Stop(); | ||
| 16 | Crash(); | 19 | Crash(); |
| 17 | throw std::runtime_error("Unreachable code"); | 20 | throw std::runtime_error("Unreachable code"); |
| 18 | } | 21 | } |