From 6af42bc0b22b732fdcebe9f706204e5fb229b209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Fri, 17 May 2024 06:53:13 -0700 Subject: [PATCH] Use NOTREACHED_IN_MIGRATION() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was generated by replacing " NOTREACHED()" with " NOTREACHED_IN_MIGRATION()" and running git cl format. This prepares for making NOTREACHED() [[noreturn]] alongside NotReachedIsFatal migration of existing inventory. Bug: chromium:40580068 Change-Id: Idb68e2fc8adba180350b0595fd494cf0f206bded Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5548246 Reviewed-by: Mark Mentovai Commit-Queue: Peter Boström --- client/crashpad_client_linux_test.cc | 2 +- client/prune_crash_reports.cc | 2 +- client/settings.cc | 2 +- handler/crash_report_upload_thread.cc | 2 +- handler/win/hanging_program.cc | 6 +++--- minidump/minidump_context_writer_test.cc | 2 +- minidump/minidump_string_writer_test.cc | 2 +- minidump/minidump_system_info_writer.cc | 4 ++-- snapshot/cpu_context.cc | 12 +++++------ snapshot/fuchsia/process_snapshot_fuchsia.cc | 3 ++- snapshot/fuchsia/system_snapshot_fuchsia.cc | 10 +++++----- snapshot/linux/system_snapshot_linux.cc | 10 +++++----- snapshot/mac/cpu_context_mac.cc | 6 +++--- snapshot/mac/system_snapshot_mac.cc | 10 +++++----- snapshot/minidump/module_snapshot_minidump.cc | 4 ++-- .../minidump/process_snapshot_minidump.cc | 6 +++--- snapshot/minidump/system_snapshot_minidump.cc | 20 +++++++++---------- .../process_snapshot_sanitized_test.cc | 2 +- snapshot/win/system_snapshot_win.cc | 10 +++++----- test/linux/fake_ptrace_connection.cc | 4 ++-- util/file/file_io_posix.cc | 2 +- util/file/file_io_win.cc | 4 ++-- util/file/output_stream_file_writer.cc | 2 +- util/mac/mac_util.cc | 2 +- util/mach/child_port_handshake.cc | 2 +- util/mach/exc_client_variants.cc | 2 +- util/mach/exception_ports.cc | 2 +- util/mach/exception_ports_test.cc | 8 ++++---- util/synchronization/scoped_spin_guard.h | 2 +- util/win/registration_protocol_win_test.cc | 2 +- 30 files changed, 74 insertions(+), 73 deletions(-) diff --git a/client/crashpad_client_linux_test.cc b/client/crashpad_client_linux_test.cc index 5d492009..ae76a7e4 100644 --- a/client/crashpad_client_linux_test.cc +++ b/client/crashpad_client_linux_test.cc @@ -765,7 +765,7 @@ class StartHandlerForChildTest : public Multiprocess { __builtin_trap(); - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } StartHandlerForClientTest test_state_; diff --git a/client/prune_crash_reports.cc b/client/prune_crash_reports.cc index 889f5671..6e4c7b9c 100644 --- a/client/prune_crash_reports.cc +++ b/client/prune_crash_reports.cc @@ -123,7 +123,7 @@ bool BinaryPruneCondition::ShouldPruneReport( case OR: return lhs_->ShouldPruneReport(report) || rhs_->ShouldPruneReport(report); default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; } } diff --git a/client/settings.cc b/client/settings.cc index 5e4119e2..420fbfc9 100644 --- a/client/settings.cc +++ b/client/settings.cc @@ -292,7 +292,7 @@ FileHandle Settings::GetHandleFromOptions( return OpenFileForReadAndWrite( file_path, options.mode, options.permissions); } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return kInvalidFileHandle; } diff --git a/handler/crash_report_upload_thread.cc b/handler/crash_report_upload_thread.cc index 5bd2889e..c224871a 100644 --- a/handler/crash_report_upload_thread.cc +++ b/handler/crash_report_upload_thread.cc @@ -236,7 +236,7 @@ void CrashReportUploadThread::ProcessPendingReport( return; case CrashReportDatabase::kCannotRequestUpload: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return; } diff --git a/handler/win/hanging_program.cc b/handler/win/hanging_program.cc index 72f903f2..00eaf171 100644 --- a/handler/win/hanging_program.cc +++ b/handler/win/hanging_program.cc @@ -40,13 +40,13 @@ DWORD WINAPI Thread1(LPVOID context) { Sleep(INFINITE); - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; } DWORD WINAPI Thread2(LPVOID dummy) { Sleep(INFINITE); - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; } @@ -65,7 +65,7 @@ DWORD WINAPI Thread3(LPVOID context) { if (!FreeLibrary(dll)) PLOG(FATAL) << "FreeLibrary"; - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; } diff --git a/minidump/minidump_context_writer_test.cc b/minidump/minidump_context_writer_test.cc index 9eebe81b..8eaae831 100644 --- a/minidump/minidump_context_writer_test.cc +++ b/minidump/minidump_context_writer_test.cc @@ -56,7 +56,7 @@ class TestTypeNames { if (std::is_same()) { return "RVA64"; } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return ""; } }; diff --git a/minidump/minidump_string_writer_test.cc b/minidump/minidump_string_writer_test.cc index 1487b138..573eac69 100644 --- a/minidump/minidump_string_writer_test.cc +++ b/minidump/minidump_string_writer_test.cc @@ -42,7 +42,7 @@ class TestTypeNames { if (std::is_same()) { return "RVA64"; } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return ""; } }; diff --git a/minidump/minidump_system_info_writer.cc b/minidump/minidump_system_info_writer.cc index e2ab775a..9fe3ac0e 100644 --- a/minidump/minidump_system_info_writer.cc +++ b/minidump/minidump_system_info_writer.cc @@ -136,7 +136,7 @@ void MinidumpSystemInfoWriter::InitializeFromSnapshot( cpu_architecture = kMinidumpCPUArchitectureRISCV64Breakpad; break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); cpu_architecture = kMinidumpCPUArchitectureUnknown; break; } @@ -185,7 +185,7 @@ void MinidumpSystemInfoWriter::InitializeFromSnapshot( operating_system = kMinidumpOSIOS; break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); operating_system = kMinidumpOSUnknown; break; } diff --git a/snapshot/cpu_context.cc b/snapshot/cpu_context.cc index 492a0f7f..71bf4ace 100644 --- a/snapshot/cpu_context.cc +++ b/snapshot/cpu_context.cc @@ -174,7 +174,7 @@ uint64_t CPUContext::InstructionPointer() const { case kCPUArchitectureRISCV64: return riscv64->pc; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return ~0ull; } } @@ -192,7 +192,7 @@ uint64_t CPUContext::StackPointer() const { case kCPUArchitectureRISCV64: return riscv64->regs[1]; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return ~0ull; } } @@ -202,12 +202,12 @@ uint64_t CPUContext::ShadowStackPointer() const { case kCPUArchitectureX86: case kCPUArchitectureARM: case kCPUArchitectureARM64: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; case kCPUArchitectureX86_64: return x86_64->xstate.cet_u.ssp; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return ~0ull; } } @@ -221,7 +221,7 @@ bool CPUContext::HasShadowStack() const { case kCPUArchitectureX86_64: return x86_64->xstate.cet_u.cetmsr != 0; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; } } @@ -238,7 +238,7 @@ bool CPUContext::Is64Bit() const { case kCPUArchitectureMIPSEL: return false; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; } } diff --git a/snapshot/fuchsia/process_snapshot_fuchsia.cc b/snapshot/fuchsia/process_snapshot_fuchsia.cc index f1a7e7b1..1f51a4c9 100644 --- a/snapshot/fuchsia/process_snapshot_fuchsia.cc +++ b/snapshot/fuchsia/process_snapshot_fuchsia.cc @@ -114,7 +114,8 @@ crashpad::ProcessID ProcessSnapshotFuchsia::ProcessID() const { crashpad::ProcessID ProcessSnapshotFuchsia::ParentProcessID() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196 + // TODO(scottmg): https://crashpad.chromium.org/bug/196 + NOTREACHED_IN_MIGRATION(); return 0; } diff --git a/snapshot/fuchsia/system_snapshot_fuchsia.cc b/snapshot/fuchsia/system_snapshot_fuchsia.cc index a9b0eed1..a764e855 100644 --- a/snapshot/fuchsia/system_snapshot_fuchsia.cc +++ b/snapshot/fuchsia/system_snapshot_fuchsia.cc @@ -108,7 +108,7 @@ uint32_t SystemSnapshotFuchsia::CPUX86Signature() const { #if defined(ARCH_CPU_X86_64) return cpuid_.Signature(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -118,7 +118,7 @@ uint64_t SystemSnapshotFuchsia::CPUX86Features() const { #if defined(ARCH_CPU_X86_64) return cpuid_.Features(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -128,7 +128,7 @@ uint64_t SystemSnapshotFuchsia::CPUX86ExtendedFeatures() const { #if defined(ARCH_CPU_X86_64) return cpuid_.ExtendedFeatures(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -137,7 +137,7 @@ uint32_t SystemSnapshotFuchsia::CPUX86Leaf7Features() const { #if defined(ARCH_CPU_X86_64) return cpuid_.Leaf7Features(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -147,7 +147,7 @@ bool SystemSnapshotFuchsia::CPUX86SupportsDAZ() const { #if defined(ARCH_CPU_X86_64) return cpuid_.SupportsDAZ(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; #endif } diff --git a/snapshot/linux/system_snapshot_linux.cc b/snapshot/linux/system_snapshot_linux.cc index b32f22d7..3eb91b4f 100644 --- a/snapshot/linux/system_snapshot_linux.cc +++ b/snapshot/linux/system_snapshot_linux.cc @@ -276,7 +276,7 @@ uint32_t SystemSnapshotLinux::CPUX86Signature() const { #if defined(ARCH_CPU_X86_FAMILY) return cpuid_.Signature(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -286,7 +286,7 @@ uint64_t SystemSnapshotLinux::CPUX86Features() const { #if defined(ARCH_CPU_X86_FAMILY) return cpuid_.Features(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -296,7 +296,7 @@ uint64_t SystemSnapshotLinux::CPUX86ExtendedFeatures() const { #if defined(ARCH_CPU_X86_FAMILY) return cpuid_.ExtendedFeatures(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -306,7 +306,7 @@ uint32_t SystemSnapshotLinux::CPUX86Leaf7Features() const { #if defined(ARCH_CPU_X86_FAMILY) return cpuid_.Leaf7Features(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -316,7 +316,7 @@ bool SystemSnapshotLinux::CPUX86SupportsDAZ() const { #if defined(ARCH_CPU_X86_FAMILY) return cpuid_.SupportsDAZ(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; #endif // ARCH_CPU_X86_FMAILY } diff --git a/snapshot/mac/cpu_context_mac.cc b/snapshot/mac/cpu_context_mac.cc index 69a54baf..c8eddfcd 100644 --- a/snapshot/mac/cpu_context_mac.cc +++ b/snapshot/mac/cpu_context_mac.cc @@ -196,7 +196,7 @@ thread_state_flavor_t InitializeCPUContextX86Flavor( } default: { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return THREAD_STATE_NONE; } } @@ -377,7 +377,7 @@ thread_state_flavor_t InitializeCPUContextX86_64Flavor( } default: { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return THREAD_STATE_NONE; } } @@ -553,7 +553,7 @@ thread_state_flavor_t InitializeCPUContextARM64Flavor( } default: { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return THREAD_STATE_NONE; } } diff --git a/snapshot/mac/system_snapshot_mac.cc b/snapshot/mac/system_snapshot_mac.cc index 334627ff..933626fc 100644 --- a/snapshot/mac/system_snapshot_mac.cc +++ b/snapshot/mac/system_snapshot_mac.cc @@ -204,7 +204,7 @@ uint32_t SystemSnapshotMac::CPUX86Signature() const { #if defined(ARCH_CPU_X86_FAMILY) return ReadIntSysctlByName("machdep.cpu.signature", 0); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -215,7 +215,7 @@ uint64_t SystemSnapshotMac::CPUX86Features() const { #if defined(ARCH_CPU_X86_FAMILY) return ReadIntSysctlByName("machdep.cpu.feature_bits", 0); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -226,7 +226,7 @@ uint64_t SystemSnapshotMac::CPUX86ExtendedFeatures() const { #if defined(ARCH_CPU_X86_FAMILY) return ReadIntSysctlByName("machdep.cpu.extfeature_bits", 0); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -251,7 +251,7 @@ uint32_t SystemSnapshotMac::CPUX86Leaf7Features() const { CallCPUID(7, &eax, &ebx, &ecx, &edx); return ebx; #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -290,7 +290,7 @@ bool SystemSnapshotMac::CPUX86SupportsDAZ() const { // Test the DAZ bit. return fxsave.mxcsr_mask & (1 << 6); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; #endif } diff --git a/snapshot/minidump/module_snapshot_minidump.cc b/snapshot/minidump/module_snapshot_minidump.cc index 50e5ea85..8d461b35 100644 --- a/snapshot/minidump/module_snapshot_minidump.cc +++ b/snapshot/minidump/module_snapshot_minidump.cc @@ -228,14 +228,14 @@ std::vector ModuleSnapshotMinidump::AnnotationObjects() std::set> ModuleSnapshotMinidump::ExtraMemoryRanges() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return std::set>(); } std::vector ModuleSnapshotMinidump::CustomMinidumpStreams() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return std::vector(); } diff --git a/snapshot/minidump/process_snapshot_minidump.cc b/snapshot/minidump/process_snapshot_minidump.cc index 03f32171..472e0257 100644 --- a/snapshot/minidump/process_snapshot_minidump.cc +++ b/snapshot/minidump/process_snapshot_minidump.cc @@ -135,7 +135,7 @@ crashpad::ProcessID ProcessSnapshotMinidump::ProcessID() const { crashpad::ProcessID ProcessSnapshotMinidump::ParentProcessID() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return 0; } @@ -208,7 +208,7 @@ std::vector ProcessSnapshotMinidump::Modules() const { std::vector ProcessSnapshotMinidump::UnloadedModules() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return unloaded_modules_; } @@ -229,7 +229,7 @@ std::vector ProcessSnapshotMinidump::MemoryMap() std::vector ProcessSnapshotMinidump::Handles() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return std::vector(); } diff --git a/snapshot/minidump/system_snapshot_minidump.cc b/snapshot/minidump/system_snapshot_minidump.cc index 58bd7b36..cfdedadf 100644 --- a/snapshot/minidump/system_snapshot_minidump.cc +++ b/snapshot/minidump/system_snapshot_minidump.cc @@ -100,36 +100,36 @@ std::string SystemSnapshotMinidump::CPUVendor() const { void SystemSnapshotMinidump::CPUFrequency(uint64_t* current_hz, uint64_t* max_hz) const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 } uint32_t SystemSnapshotMinidump::CPUX86Signature() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return 0; } uint64_t SystemSnapshotMinidump::CPUX86Features() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return 0; } uint64_t SystemSnapshotMinidump::CPUX86ExtendedFeatures() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return 0; } uint32_t SystemSnapshotMinidump::CPUX86Leaf7Features() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return 0; } bool SystemSnapshotMinidump::CPUX86SupportsDAZ() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return false; } @@ -178,13 +178,13 @@ std::string SystemSnapshotMinidump::OSVersionFull() const { std::string SystemSnapshotMinidump::MachineDescription() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return std::string(); } bool SystemSnapshotMinidump::NXEnabled() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return false; } @@ -194,12 +194,12 @@ void SystemSnapshotMinidump::TimeZone(DaylightSavingTimeStatus* dst_status, std::string* standard_name, std::string* daylight_name) const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 } uint64_t SystemSnapshotMinidump::AddressMask() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // https://crashpad.chromium.org/bug/10 + NOTREACHED_IN_MIGRATION(); // https://crashpad.chromium.org/bug/10 return 0; } diff --git a/snapshot/sanitized/process_snapshot_sanitized_test.cc b/snapshot/sanitized/process_snapshot_sanitized_test.cc index 329c3c76..e9a835b1 100644 --- a/snapshot/sanitized/process_snapshot_sanitized_test.cc +++ b/snapshot/sanitized/process_snapshot_sanitized_test.cc @@ -129,7 +129,7 @@ void ChildTestFunction() { CRASHPAD_CHILD_TEST_MAIN(ChildToBeSanitized) { ChildTestFunction(); - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return EXIT_SUCCESS; } diff --git a/snapshot/win/system_snapshot_win.cc b/snapshot/win/system_snapshot_win.cc index 1eaad8a9..65d06b27 100644 --- a/snapshot/win/system_snapshot_win.cc +++ b/snapshot/win/system_snapshot_win.cc @@ -360,7 +360,7 @@ uint32_t SystemSnapshotWin::CPUX86Signature() const { __cpuid(cpu_info, 1); return cpu_info[0]; #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -375,7 +375,7 @@ uint64_t SystemSnapshotWin::CPUX86Features() const { return (static_cast(cpu_info[2]) << 32) | static_cast(cpu_info[3]); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -391,7 +391,7 @@ uint64_t SystemSnapshotWin::CPUX86ExtendedFeatures() const { return (static_cast(cpu_info[2]) << 32) | static_cast(cpu_info[3]); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -410,7 +410,7 @@ uint32_t SystemSnapshotWin::CPUX86Leaf7Features() const { __cpuidex(cpu_info, 7, 0); return cpu_info[1]; #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } @@ -441,7 +441,7 @@ bool SystemSnapshotWin::CPUX86SupportsDAZ() const { // Test the DAZ bit. return (mxcsr_mask & (1 << 6)) != 0; #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; #endif } diff --git a/test/linux/fake_ptrace_connection.cc b/test/linux/fake_ptrace_connection.cc index af686ae3..8eefe6b2 100644 --- a/test/linux/fake_ptrace_connection.cc +++ b/test/linux/fake_ptrace_connection.cc @@ -90,14 +90,14 @@ ProcessMemoryLinux* FakePtraceConnection::Memory() { bool FakePtraceConnection::Threads(std::vector* threads) { // TODO(jperaza): Implement this if/when it's needed. - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; } ssize_t FakePtraceConnection::ReadUpTo(VMAddress address, size_t size, void* buffer) { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; } diff --git a/util/file/file_io_posix.cc b/util/file/file_io_posix.cc index 6d02462b..37e923ac 100644 --- a/util/file/file_io_posix.cc +++ b/util/file/file_io_posix.cc @@ -276,7 +276,7 @@ FileHandle StdioFileHandle(StdioStream stdio_stream) { return STDERR_FILENO; } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return kInvalidFileHandle; } diff --git a/util/file/file_io_win.cc b/util/file/file_io_win.cc index cb9ea147..876f5783 100644 --- a/util/file/file_io_win.cc +++ b/util/file/file_io_win.cc @@ -230,7 +230,7 @@ FileOffset LoggingSeekFile(FileHandle file, FileOffset offset, int whence) { method = FILE_END; break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); break; } @@ -283,7 +283,7 @@ FileHandle StdioFileHandle(StdioStream stdio_stream) { standard_handle = STD_ERROR_HANDLE; break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return INVALID_HANDLE_VALUE; } diff --git a/util/file/output_stream_file_writer.cc b/util/file/output_stream_file_writer.cc index 9cab03db..8d9cb976 100644 --- a/util/file/output_stream_file_writer.cc +++ b/util/file/output_stream_file_writer.cc @@ -56,7 +56,7 @@ bool OutputStreamFileWriter::WriteIoVec(std::vector* iovecs) { } FileOffset OutputStreamFileWriter::Seek(FileOffset offset, int whence) { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return -1; } diff --git a/util/mac/mac_util.cc b/util/mac/mac_util.cc index cef23872..37b595b6 100644 --- a/util/mac/mac_util.cc +++ b/util/mac/mac_util.cc @@ -207,7 +207,7 @@ int MacOSVersionNumber() { #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13_4 // On macOS 10.13.4 and later, the sysctlbyname above should have been // successful. - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return -1; #else // DT >= 10.13.4 // The Darwin major version is always 4 greater than the macOS minor version diff --git a/util/mach/child_port_handshake.cc b/util/mach/child_port_handshake.cc index afbf55f1..3402d2da 100644 --- a/util/mach/child_port_handshake.cc +++ b/util/mach/child_port_handshake.cc @@ -256,7 +256,7 @@ mach_port_t ChildPortHandshakeServer::RunServer( break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); break; } } diff --git a/util/mach/exc_client_variants.cc b/util/mach/exc_client_variants.cc index f7cb763a..a2c63139 100644 --- a/util/mach/exc_client_variants.cc +++ b/util/mach/exc_client_variants.cc @@ -123,7 +123,7 @@ kern_return_t UniversalExceptionRaise(exception_behavior_t behavior, new_state_count); default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return KERN_INVALID_ARGUMENT; } } diff --git a/util/mach/exception_ports.cc b/util/mach/exception_ports.cc index b983cc6c..0f80887a 100644 --- a/util/mach/exception_ports.cc +++ b/util/mach/exception_ports.cc @@ -80,7 +80,7 @@ ExceptionPorts::ExceptionPorts(TargetType target_type, mach_port_t target_port) break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); get_exception_ports_ = nullptr; set_exception_ports_ = nullptr; target_name_ = nullptr; diff --git a/util/mach/exception_ports_test.cc b/util/mach/exception_ports_test.cc index b37a99a2..a6d065bc 100644 --- a/util/mach/exception_ports_test.cc +++ b/util/mach/exception_ports_test.cc @@ -188,7 +188,7 @@ class TestExceptionPorts : public MachMultiprocess, } else if (who_crashes_ == kOtherThreadCrashes) { expect_behavior = EXCEPTION_STATE_IDENTITY; } else { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); expect_behavior = 0; } @@ -286,7 +286,7 @@ class TestExceptionPorts : public MachMultiprocess, } default: { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } } } @@ -369,7 +369,7 @@ class TestExceptionPorts : public MachMultiprocess, break; } default: { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } } } @@ -520,7 +520,7 @@ class TestExceptionPorts : public MachMultiprocess, } default: { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } } } diff --git a/util/synchronization/scoped_spin_guard.h b/util/synchronization/scoped_spin_guard.h index 6e445b85..08141922 100644 --- a/util/synchronization/scoped_spin_guard.h +++ b/util/synchronization/scoped_spin_guard.h @@ -92,7 +92,7 @@ class ScopedSpinGuard final { SleepNanoseconds(kSpinGuardSleepTimeNanos); } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } ~ScopedSpinGuard() { diff --git a/util/win/registration_protocol_win_test.cc b/util/win/registration_protocol_win_test.cc index 20c75239..9ce265ac 100644 --- a/util/win/registration_protocol_win_test.cc +++ b/util/win/registration_protocol_win_test.cc @@ -98,7 +98,7 @@ void CheckAce(PACL acl, mask = label_ace->Mask; } break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); break; }